Actually run the unit tests in CI - #63
Merged
Merged
Conversation
The build-blah2 test job has never executed a test. It ran them against the
runtime image:
cd /opt/blah2/bin/test/unit 2>/dev/null || { echo "No unit tests directory
found"; exit 0; }
but the runtime stage copies only /blah2/bin/blah2, so that directory has never
existed there. Every run printed "No unit tests directory found" and exited 0,
and the job reported success. Confirmed on run 34849707024, which is green and
ran nothing.
The tests are built into /opt/blah2/bin/test/unit by the blah2 stage, so they
now run there, as part of the build. set -e makes a failing test fail the
build, and the two emptiness checks make a missing or empty test directory fail
it as well, so the previous silent-pass mode cannot come back. BLAH2_FFT_CACHE
is pointed at a writable path because a test that measures FFT lengths has to
agree with itself across instances, and the default cache location is a host
mount that does not exist at build time.
The workflow step is replaced with the opposite assertion: the runtime image
must NOT contain test binaries. That keeps the deployed image lean and would
catch someone "fixing" this by copying tests into it.
Running them in the build rather than in a separate job avoids shipping the
build-stage image, which carries vcpkg and the toolchain, between jobs.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
build-blah2test job has never executed a single test, and has been reporting success for it.It ran them against the runtime image:
The runtime stage copies only
/blah2/bin/blah2, so that directory has never existed there. Every run printed "No unit tests directory found" and exited 0. Confirmed on run 34849707024, which is green and ran nothing.The fix
The tests are built into
/opt/blah2/bin/test/unitby theblah2stage, so they now run there, as part of the build:set -emeans a failing test fails the build.BLAH2_FFT_CACHEpoints at a writable path, because a test that measures FFT lengths has to agree with itself across instances and the default cache location is a host mount that does not exist at build time.The workflow step is replaced with the opposite assertion: the runtime image must not contain test binaries. That keeps the deployed image lean and would catch someone "fixing" this by copying tests into it.
Running them in the build rather than a separate job avoids shipping the build-stage image, which carries vcpkg and the toolchain, between jobs.
Verified
Run 34951645250, on this branch:
Build cost is 0.3 s. All three of main's existing suites pass, so this does not turn CI red on merge.
Why this matters now
There are three PRs stacked behind this (#60, #61, #62) whose safety argument rests entirely on unit tests that compare new code against the code it replaces. Without this, those checks are decorative.
It has already cost something real: #62 carries a test that fails, and nobody noticed, because CI never ran it. Expect that PR to go red once this lands, which is the correct outcome.
🤖 Generated with Claude Code