-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #7350 - alexcrichton:mock-std, r=ehuss
Improve test suite for `-Zbuild-std` This commit is aimed directly at rust-lang/wg-cargo-std-aware#33 and in general making the `-Zbuild-std` tests more robust. The main change here is that a new source tree is checked in, `tests/testsuite/mock-std`, which mirrors rust-lang/rust's own tree for libstd. This mock tree is as empty as it can be, ideally duplicating almost nothing but for not requiring duplication of Cargo metadata about patches and such. The end result here looks like: * All `-Zbuild-std` tests are now run in parallel * All tests run much more quickly since they're compiling tiny crates instead of actually compiling libstd/libcore * No tests require network access * We verify that crates have access to the "custom" libraries that we build Coverage of tests is not currently expanded, but it's hoped that we could add that shortly afterwards. Coverage has actually gone down slightly since the custom target test was commented out temporarily and the full integration test of running `-Zbuild-std` isn't run on CI any more. Closes rust-lang/wg-cargo-std-aware#33
- Loading branch information
Showing
125 changed files
with
1,000 additions
and
467 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[package] | ||
name = "cargo-test-support" | ||
version = "0.1.0" | ||
authors = ["Alex Crichton <[email protected]>"] | ||
edition = "2018" | ||
|
||
[lib] | ||
doctest = false | ||
|
||
[dependencies] | ||
cargo = { path = "../.." } | ||
cargo-test-macro = { path = "../cargo-test-macro" } | ||
filetime = "0.2" | ||
flate2 = "1.0" | ||
git2 = "0.10" | ||
glob = "0.3" | ||
lazy_static = "1.0" | ||
remove_dir_all = "0.5" | ||
serde_json = "1.0" | ||
tar = "0.4" | ||
url = "2.0" |
3 changes: 1 addition & 2 deletions
3
tests/testsuite/support/cross_compile.rs → ...s/cargo-test-support/src/cross_compile.rs
This file contains 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
This file contains 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
3 changes: 1 addition & 2 deletions
3
tests/testsuite/support/install.rs → crates/cargo-test-support/src/install.rs
This file contains 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
This file contains 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
This file contains 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
8 changes: 3 additions & 5 deletions
8
tests/testsuite/support/publish.rs → crates/cargo-test-support/src/publish.rs
This file contains 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
14 changes: 6 additions & 8 deletions
14
tests/testsuite/support/registry.rs → crates/cargo-test-support/src/registry.rs
This file contains 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
This file contains 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
Oops, something went wrong.