Conversation
CudaTestMakefileTest shells out to make to dry-run the cuda-test recipe, but unlike its siblings it never checks that make is there. Without it the six recipe tests raise FileNotFoundError from CreateProcess/exec and the file reports six errors -- an absent prerequisite dressed up as a regression. test_makefile_platform.py already has the shape: resolve make once with shutil.which, invoke it by that path, and skipUnless on the result. test_makefile_cuda_scope.py and test_backend_loader.py guard the same way. This file is the only one of the five that reaches for make and does not. test_setup_openmp_probe_does_not_require_tmp only reads setup.sh, so it moves to its own class instead of being skipped along with the rest -- a class-level guard would have cost that coverage. Running make through the resolved absolute path rather than the bare name also matches the sibling, and avoids relying on PATHEXT resolution. python -m unittest discover -s tests, on a host with no make: before FAILED (errors=6) 819 ran, 132 skipped after OK 813 ran, 138 skipped With make present every test still runs; nothing is skipped on CI.
|
Fork CI results, as promised in the description. Both of this repo's workflows, unmodified, on
The check that actually matters. A guard that quietly disabled six build-contract assertions on CI would be worse than the errors it replaces, so I ran the baseline too β the same
Identical. Where |
Summary
CudaTestMakefileTestshells out tomaketo dry-run thecuda-testrecipe but never checks thatmakeis there, so on a host without it the six recipe tests raiseFileNotFoundErrorβ an absent prerequisite dressed up as a regression.Five test files reach for
make; four guard it and this is the one that does not, so this appliestest_makefile_platform.py's existing idiom:MAKE = shutil.which("make"),@unittest.skipUnless(MAKE, ...), and invoke by the resolved path.test_setup_openmp_probe_does_not_require_tmponly readssetup.sh, so it moves to its own class rather than being skipped along with the rest.Validation
make -C c checkβ via this repo's owncheckandCIworkflows run unmodified on a fork: 28 jobs green, Linux/Windows UCRT64/macOS, sanitizers, musl, ARM and every tiny-oracle gate.make -C c cuda-testβ n/a, no CUDA code changed.python -m unittest discover -s tests -p 'test_*.py'on Windows 11 / Python 3.12 with nomakeon PATH: beforeFAILED (errors=6), 819 ran / 132 skipped; afterOK, 813 ran / 138 skipped.The check that matters is the opposite one β a guard that silently disabled six build-contract assertions on CI would be worse than the errors it replaces β so I confirmed unmodified
dev(b5968eb) and this branch both report934 ran, 119 skippedin the LinuxPython testsjob.Compatibility
A scan turned up two other bare-name invocations and I left both alone:
test_mw_ur3_raw_adapter.py'smakecall is inside an already-@unittest.skipped test, andtest_supervisor_scope.py'sbashsits behindsys.platform.startswith("linux") and shutil.which("flock").