Skip to content

Add 0.17.0 support, report test progress, and cleanup paths - #31

Merged
Parzival-3141 merged 6 commits into
mainfrom
0.17.0
Oct 27, 2026
Merged

Parzival-3141 merged 6 commits into
mainfrom
0.17.0

Conversation

@Parzival-3141

Copy link
Copy Markdown
Collaborator

Closes #29

Adds Zig 0.17.0 support, which required patching clar on windows builds (see commit). This PR is backwards compatible with 0.16.0.

The test runner has been reintegrated with the build system and properly reports progress and errors. Errors get formatted nicely in the terminal now too.

Source paths have been moved into a zon file to reduce clutter in the build script. I've also removed redundant path prefixes to save some bytes.

Save some bytes by only writing the path prefix once or twice.
The macro configuration for file stats in `tests/clar/clar.c` is bugged when targeting mingw-w64,
and ends up mismatching the functions and types. See the upstream patch for more info:
clar-test/clar@02104ca

`build/clar_fix.zig` has been refactored to apply this patch when building tests on a windows machine.
This fix should be removed after updating our upstream to a version including the patch.
Test progress is reported through the build system via `std.Progress`.
We can only report progress at the suite level since clar's TAP output
only reports individual tests after they've been ran. clar also doesn't
report how many tests are expected to run, so we can't provide an estimate
either. We could get this info by parsing the runner's --list output and
applying test filters manually, but that's more effort than it's worth.

Failures are printed to stderr on suite completion.
Silently drops the line if parsing or openFile fails,
though that's unlikely since clar itself would probably have failed too.
@Parzival-3141 Parzival-3141 mentioned this pull request Oct 27, 2026
3 tasks done
@Parzival-3141

Copy link
Copy Markdown
Collaborator Author

To avoid lagging CI runs I haven't added 0.17.0 tests. However I have tested Linux and Windows builds locally and they pass. I will bump the CI version in the next release.

@Parzival-3141
Parzival-3141 merged commit 71b31da into main Oct 27, 2026
3 checks passed
@Parzival-3141
Parzival-3141 deleted the 0.17.0 branch October 27, 2026 02:35
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.

Re-integrate clar tests with the build system

1 participant