tests: skip fixture-dependent cases without test-suite checkout#316
Merged
Conversation
Collaborator
|
@Sim-hu Can you update it to latest that uses Zig 0.16.0? |
Some tests were still calling raw Image.detectFormatFromFilePath and zigimg.Image.fromFilePath for fixtures under ../test-suite/fixtures/. In a plain zigimg checkout those calls return FileNotFound, turning 'zig build test' into a hard failure instead of a skip. Route them through skip-aware helpers (testDetectFormatFromFilePath and testImageFromFileWithAllocator) so the fixture-less case is treated as SkipZigTest, matching the pattern already used for testImageFromFile/testOpenFile/testReadFile.
60b2475 to
059f3d6
Compare
Contributor
Author
|
Rebased onto latest master and verified |
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.
Summary
error.SkipZigTesttests/image_test.zigand the rotating earth GIF loader../test-suite/fixtures/is not checked outWhy
Some tests already treat a missing
../test-suite/fixtures/checkout aserror.SkipZigTest, but a few code paths were still calling the raw image APIs directly. In a plain checkout, that madezig build testfail withFileNotFoundinstead of skipping those cases.Validation
nix-shell -p zig --run 'zig build test'