Repository navigation
[test] find example binaries in the Cargo 1.100 build layout - #1771
Merged
Merged
Conversation
Cargo 1.100 runs integration tests from build/<package>/<hash>/out instead of deps, so the pagination tests failed their check that the test program lives in deps. Search the test program's ancestors for the examples directory instead, which works with both layouts.
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.
CI's stable jobs now run Rust 1.100, and its Cargo runs integration tests from
target/debug/build/dropshot/<hash>/out/instead oftarget/debug/deps/.start_exampleasserted that the test program's directory isdeps, sopagination::test_example_basic,test_example_multiple_resourcesandtest_example_multiple_sortsfail on every PR (for example https://github.com/oxidecomputer/dropshot/actions/runs/43872594635):Example binaries still land in
target/debug/examples/, so this searches the test program's ancestors forexamples/<name>instead of assuming a fixed depth.Tested
cargo test -p dropshot --test integration-tests pagination::test_exampleon 1.99.1 (the pinned toolchain,depslayout) and 1.100.0 (build/.../outlayout): 3 passed on both, and 1.100.0 fails without the change.cargo fmt --checkand clippy are clean.