Skip to content

Commit

Permalink
testsuite: Use split debuginfo on macos.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Feb 25, 2021
1 parent 572e201 commit 0f78dbd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
8 changes: 8 additions & 0 deletions crates/cargo-test-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1583,6 +1583,14 @@ fn _process(t: &OsStr) -> cargo::util::ProcessBuilder {
}
}

if cfg!(target_os = "macos") {
// This makes the test suite run substantially faster.
p.env("CARGO_PROFILE_DEV_SPLIT_DEBUGINFO", "unpacked")
.env("CARGO_PROFILE_TEST_SPLIT_DEBUGINFO", "unpacked")
.env("CARGO_PROFILE_RELEASE_SPLIT_DEBUGINFO", "unpacked")
.env("CARGO_PROFILE_BENCH_SPLIT_DEBUGINFO", "unpacked");
}

p.cwd(&paths::root())
.env("HOME", paths::home())
.env("CARGO_HOME", paths::home().join(".cargo"))
Expand Down
4 changes: 1 addition & 3 deletions tests/testsuite/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1656,9 +1656,7 @@ fn lto_build() {
--emit=[..]link \
-C opt-level=3 \
-C lto \
-C metadata=[..] \
--out-dir [CWD]/target/release/deps \
-L dependency=[CWD]/target/release/deps`
[..]
[FINISHED] release [optimized] target(s) in [..]
",
)
Expand Down
16 changes: 8 additions & 8 deletions tests/testsuite/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,8 @@ fn cdylib_and_rlib() {
[FRESH] registry-shared v0.0.1
[FRESH] bar v0.0.0 [..]
[COMPILING] foo [..]
[RUNNING] `rustc --crate-name foo [..]-C embed-bitcode=no --test[..]
[RUNNING] `rustc --crate-name a [..]-C embed-bitcode=no --test[..]
[RUNNING] `rustc --crate-name foo [..]-C embed-bitcode=no [..]--test[..]
[RUNNING] `rustc --crate-name a [..]-C embed-bitcode=no [..]--test[..]
[FINISHED] [..]
[RUNNING] [..]
[RUNNING] [..]
Expand All @@ -520,8 +520,8 @@ fn cdylib_and_rlib() {
[RUNNING] `rustc --crate-name registry_shared [..]-C embed-bitcode=no[..]
[COMPILING] bar [..]
[RUNNING] `rustc --crate-name bar [..]--crate-type cdylib --crate-type rlib [..]-C embed-bitcode=no[..]
[RUNNING] `rustc --crate-name bar [..]-C embed-bitcode=no --test[..]
[RUNNING] `rustc --crate-name b [..]-C embed-bitcode=no --test[..]
[RUNNING] `rustc --crate-name bar [..]-C embed-bitcode=no [..]--test[..]
[RUNNING] `rustc --crate-name b [..]-C embed-bitcode=no [..]--test[..]
[FINISHED] [..]
[RUNNING] [..]target/release/deps/bar-[..]
[RUNNING] [..]target/release/deps/b-[..]
Expand Down Expand Up @@ -552,8 +552,8 @@ fn dylib() {
[FRESH] registry-shared v0.0.1
[FRESH] bar v0.0.0 [..]
[COMPILING] foo [..]
[RUNNING] `rustc --crate-name foo [..]-C embed-bitcode=no --test[..]
[RUNNING] `rustc --crate-name a [..]-C embed-bitcode=no --test[..]
[RUNNING] `rustc --crate-name foo [..]-C embed-bitcode=no [..]--test[..]
[RUNNING] `rustc --crate-name a [..]-C embed-bitcode=no [..]--test[..]
[FINISHED] [..]
[RUNNING] [..]
[RUNNING] [..]
Expand All @@ -578,8 +578,8 @@ fn dylib() {
[FRESH] registry-shared v0.0.1
[FRESH] registry v0.0.1
[COMPILING] bar [..]
[RUNNING] `rustc --crate-name bar [..]-C embed-bitcode=no --test[..]
[RUNNING] `rustc --crate-name b [..]-C embed-bitcode=no --test[..]
[RUNNING] `rustc --crate-name bar [..]-C embed-bitcode=no [..]--test[..]
[RUNNING] `rustc --crate-name b [..]-C embed-bitcode=no [..]--test[..]
[FINISHED] [..]
[RUNNING] [..]
[RUNNING] [..]
Expand Down

0 comments on commit 0f78dbd

Please sign in to comment.