From cb250227835a488c2bc99f7d6dbdb1ac14ae249a Mon Sep 17 00:00:00 2001 From: ethernet Date: Fri, 4 Sep 2026 08:53:52 -0400 Subject: [PATCH] fix(ci): strip CRLF from marked-test file list on Windows lanes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- .github/workflows/tests-os.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests-os.yml b/.github/workflows/tests-os.yml index 2acf8fe1bb..7ce8962082 100644 --- a/.github/workflows/tests-os.yml +++ b/.github/workflows/tests-os.yml @@ -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"