Skip to content

[test] find example binaries in the Cargo 1.100 build layout - #1771

Merged
ahl merged 2 commits into
oxidecomputer:mainfrom
mliemm:fix/examples-path-build-dir
Nov 18, 2026
Merged

ahl merged 2 commits into
oxidecomputer:mainfrom
mliemm:fix/examples-path-build-dir

Conversation

@mliemm

@mliemm mliemm commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

CI's stable jobs now run Rust 1.100, and its Cargo runs integration tests from target/debug/build/dropshot/<hash>/out/ instead of target/debug/deps/. start_example asserted that the test program's directory is deps, so pagination::test_example_basic, test_example_multiple_resources and test_example_multiple_sorts fail on every PR (for example https://github.com/oxidecomputer/dropshot/actions/runs/43872594635):

assertion `left == right` failed
  left: "out"
 right: "deps"

Example binaries still land in target/debug/examples/, so this searches the test program's ancestors for examples/<name> instead of assuming a fixed depth.

Tested cargo test -p dropshot --test integration-tests pagination::test_example on 1.99.1 (the pinned toolchain, deps layout) and 1.100.0 (build/.../out layout): 3 passed on both, and 1.100.0 fails without the change. cargo fmt --check and clippy are clean.

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.
Copilot AI balanced review requested due to automatic review settings November 17, 2026 06:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@ahl ahl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@ahl
ahl merged commit d004b48 into oxidecomputer:main Nov 18, 2026
18 checks passed
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.

3 participants