8000 Keep passing test runs silent under zig 0.17's build runner by mparrett · Pull Request #44 · nooga/slab · GitHub
[go: up one dir, main page]

Keep passing test runs silent under zig 0.17's build runner - #44

Open
mparrett wants to merge 3 commits into
nooga:masterfrom
mparrett:fy-quiet-tests
Open

mparrett wants to merge 3 commits into
nooga:masterfrom
mparrett:fy-quiet-tests

Conversation

@mparrett
@mparrett mparrett commented Nov 7, 2026 •
Copy link
Copy Markdown
Contributor

With zig 0.17, the build runner prints a failed command: … line above a test binary's stderr whenever there is any, even when every test passes. A clean zig build test in fy/ printed about 800 lines under that header:

  • each TestCase's input and result
  • fy's own output words
  • the compile errors from tests that expect an error (dsp: k-e4: unsupported word…)

At the root, Slab's suite printed the stall watchdog's warning from the test that stalls on purpose. Either way a passing run looked like a failure.

fy

  • Under test, outPrint (fy's output words) is silent unless FY_TEST_VERBOSE is set.
  • run no longer prints its compile error under test. It keeps it instead (lastTestError), and a TestCase that errors prints its input, the error and that message.
  • errPrint is unchanged, so opt-in traces such as FY_DEBUG_ADAPTER still print.
  • The [tests] banner line is gone.

Slab: the Stall test lowers std.testing.log_level while it stalls on purpose. The watchdog itself is unchanged.

Tested with zig 0.17.0:

  • After clearing .zig-cache, fy/ reports 82/82 tests passed and the root reports 585/586 with 1 skipped. Neither prints anything else.
  • FY_TEST_VERBOSE=1 brings back all of fy's output.
  • With cases broken on purpose:
    • a wrong value (1 2 + expecting 4) prints the input along with the expected and actual values
    • an unknown word prints fy> 1 2 nosuchword and UnknownWord: line 1: unknown word 'nosuchword'

🤖 Generated with Claude Code

mparrett and others added 3 commits November 7, 2026 09:24
zig 0.17's build runner shows any test stderr under a `failed command:`
line even when every test passes, and fy's tests printed ~800 lines:
each case's input and result, fy's own output words, and the compile
errors of tests that expect one. A clean run now prints nothing; a
failing case still prints its input and what it got, and
FY_TEST_VERBOSE=1 brings everything back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Stall test stalls on purpose, and its warning was the only stderr
left in a passing `zig build test`, which the build runner reports as a
`failed command`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…via log level

Review fixes. errPrint is back as it was, so FY_DEBUG_ADAPTER and the
dl-open message print under test again; only run's compile error is held
(lastTestError) and a failing case prints it. The Stall test lowers
std.testing.log_level itself instead of the watchdog checking is_test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant

0