Skip to content

Fix #767 (CI: run run-tests.py on windows) - #768

Merged
danmar merged 1 commit into
masterfrom
fix-767
Nov 19, 2026
Merged

danmar merged 1 commit into
masterfrom
fix-767

Conversation

@danmar

@danmar danmar commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

run-tests.py was never executed in the MSVC Windows workflow. Make it usable there: take the simplecpp path from SIMPLECPP_EXE_PATH (like integration_test.py) and normalize the backslash separators that glob returns on Windows so the skip/todo lists match.

run-tests.py was never executed in the MSVC Windows workflow. Make it
usable there: take the simplecpp path from SIMPLECPP_EXE_PATH (like
integration_test.py) and normalize the backslash separators that glob
returns on Windows so the skip/todo lists match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@dmcppcheck dmcppcheck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review

The changes to run-tests.py are correct. On Linux, results are unchanged. In a simulation of Windows-style backslash paths from glob, the skip and todo lists still match.

The one concern is the new CI step. The title says windows-2022, but the step runs in every entry of the matrix (windows-2022, windows-2025, windows-11-arm × Release/Debug). The workflow never installs gcc or clang. It relies on whatever the runner image puts on PATH. If either compiler is missing on an image, run-tests.py stops at once with Failed to run tests: gcc compiler not found (exit code 1), and that job fails. windows-11-arm is the most likely to lack MinGW gcc. I could not check this here because there is no network.

I found no other problems.

Comments

# Comment By Where Status
1 run-tests.py step runs on the whole matrix and depends on gcc/clang already being on PATH AI review .github/workflows/CI-windows.yml:74 🆕 New

@danmar, please fix, resolve or reply to the open and new comments: #1.

Testing

  • Built /work/pr with make -j8 testrunner simplecpp CXXOPTS=-Werror: OK.
  • ./testrunner: exit 0.
  • python3 run-tests.py: 176 tests, 21 skipped, 14 todos (0 fixed), 0 failed.
  • python3 -m pytest integration_test.py: 128 passed.
  • ./selfcheck.sh: exit 0.
  • SIMPLECPP_EXE_PATH=/work/pr/simplecpp python3 run-tests.py uses the given binary. With SIMPLECPP_EXE_PATH=/nonexistent the script fails with FileNotFoundError, as expected.
  • I simulated Windows paths with /work/scratch/sim.py. It wraps glob.glob so that it returns testsuite\...\x.c, maps the paths back to forward slashes for the subprocesses, and then runs run-tests.py with runpy. Result: 176 tests, 21 skipped, 14 todos, 0 failed. So the new replace('\\', '/') keeps the skip and todo matching working.
  • I could not run the Windows workflow itself: there is no Windows runner and no network here. Whether gcc and clang are on PATH on each runner image is therefore unverified.

Automated review of ca373bc by Claude. The pull request was built and tested locally.

Comment thread .github/workflows/CI-windows.yml Resolved
@danmar danmar changed the title Fix #767 (CI: run run-tests.py on windows-2022) Fix #767 (CI: run run-tests.py on windows) Nov 19, 2026
@danmar
danmar merged commit d4ff563 into master Nov 19, 2026
55 checks passed
@danmar
danmar deleted the fix-767 branch November 19, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants