fix(ci): strip CRLF from marked-test file list on Windows lanes

list_os_marked_tests.py's stdout, when redirected on Windows, carries
CRLF line endings (Python text-mode \n -> \r\n). The workflow's
'set -- ' word-split on the \r too, leaving it attached to
every path — pytest then failed 'file or directory not found:
tests/.../test_foo.py\r' on the first file. macOS passed because LF-only
there. Strip \r via 'tr -d' before word-splitting (no-op on POSIX).
This commit is contained in:
ethernet
2026-09-04 08:53:52 -04:00
parent 95eba6d940
commit cb25022783

View File

@@ -138,8 +138,12 @@ jobs:
# Deliberately NOT `mapfile`: that is a bash 4 builtin and the macOS
# runner's /bin/bash is 3.2. Word-splitting is safe here because the
# helper emits repo-relative test paths, which contain no spaces.
# `tr -d '\r'`: on Windows, the helper's stdout is redirected and
# Python emits CRLF line endings — a bare `$(cat "$LIST")` would
# leave the `\r` attached to every path ("file or directory not
# found: tests/.../test_foo.py\r").
# shellcheck disable=SC2046
set -- $(cat "$LIST")
set -- $(tr -d '\r' < "$LIST")
echo "selected $# file(s) for ${{ matrix.marker }}:"
cat "$LIST"