test: Handle non-deterministic compilation order - #17347
Merged
Merged
Conversation
Hit this with rust-lang#17346 ``` thread 'build_script::cfg_override_test' (71300) panicked at tests/testsuite/build_script.rs:3634:10: ---- expected: tests/testsuite/build_script.rs:3601:27 ++++ actual: stderr 1 1 | [COMPILING] foo v0.0.1 ([ROOT]/foo) 2 2 | [RUNNING] `rustc --crate-name foo[..]` 3 - [RUNNING] `rustc --crate-name foo[..]` 4 - [RUNNING] `rustc --crate-name test[..]` 3 + [RUNNING] `rustc --crate-name test --edition=2015 tests/test.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=400 --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked --allow=unexpected_cfgs --test --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=7e98bdc87b54be1e -C extra-filename=-46d1fa8b5db2bd02 --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps --extern foo=[ROOT]/foo/target/debug/deps/libfoo-[HASH].rlib --cfg foo` 4 + [RUNNING] `rustc --crate-name foo --edition=2015 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=400 --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked --allow=unexpected_cfgs --test --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=e83780a000df3302 -C extra-filename=-e1364ce7fb0b5fef --out-dir [ROOT]/foo/target/debug/deps -L dependency=[ROOT]/foo/target/debug/deps --cfg foo` 5 5 | [FINISHED] `test` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s 6 6 | [RUNNING] `[ROOT]/foo/target/debug/deps/foo-[HASH][EXE]` 7 7 | [RUNNING] `[ROOT]/foo/target/debug/deps/test-[HASH][EXE]` 8 8 | [DOCTEST] foo 9 9 | [RUNNING] `rustdoc [..] --cfg foo[..]` ```
Collaborator
|
r? @weihanglo rustbot has assigned @weihanglo. Use Why was this reviewer chosen?The reviewer was selected based on:
|
weihanglo
approved these changes
Aug 10, 2026
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
Aug 11, 2026
Update cargo submodule 10 commits in b07e5a08651da80108eb65d7dc769ee04589f9bf..eb98b54bc9f3c74519f43d066cb3fd02ebc88df0 2026-08-07 21:51:16 +0000 to 2026-08-11 16:00:29 +0000 - feat(trim-paths): honor workspace prefix override from env (rust-lang/cargo#17349) - fix(clean): respect target with --doc (rust-lang/cargo#17322) - chore(renovate): Use a 3day minimum release age (rust-lang/cargo#17346) - test: Handle non-deterministic compilation order (rust-lang/cargo#17347) - docs(ref): Add missing config env variables (rust-lang/cargo#17345) - fix(trim-paths): workspace remap under -Zroot-dir (rust-lang/cargo#17337) - Fix funding link (rust-lang/cargo#17344) - fix(trim-paths): `/cargo/deps` fallback sources (rust-lang/cargo#17338) - doc: don't use mergeable info and json together (rust-lang/cargo#17336) - docs: document --output-format for cargo doc (rust-lang/cargo#17325)
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.
What does this PR try to resolve?
Hit this with #17346
How to test and review this PR?