Skip to content

Commit 0f78dbd

Browse files
committed
testsuite: Use split debuginfo on macos.
1 parent 572e201 commit 0f78dbd

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

crates/cargo-test-support/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,14 @@ fn _process(t: &OsStr) -> cargo::util::ProcessBuilder {
15831583
}
15841584
}
15851585

1586+
if cfg!(target_os = "macos") {
1587+
// This makes the test suite run substantially faster.
1588+
p.env("CARGO_PROFILE_DEV_SPLIT_DEBUGINFO", "unpacked")
1589+
.env("CARGO_PROFILE_TEST_SPLIT_DEBUGINFO", "unpacked")
1590+
.env("CARGO_PROFILE_RELEASE_SPLIT_DEBUGINFO", "unpacked")
1591+
.env("CARGO_PROFILE_BENCH_SPLIT_DEBUGINFO", "unpacked");
1592+
}
1593+
15861594
p.cwd(&paths::root())
15871595
.env("HOME", paths::home())
15881596
.env("CARGO_HOME", paths::home().join(".cargo"))

tests/testsuite/build.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,9 +1656,7 @@ fn lto_build() {
16561656
--emit=[..]link \
16571657
-C opt-level=3 \
16581658
-C lto \
1659-
-C metadata=[..] \
1660-
--out-dir [CWD]/target/release/deps \
1661-
-L dependency=[CWD]/target/release/deps`
1659+
[..]
16621660
[FINISHED] release [optimized] target(s) in [..]
16631661
",
16641662
)

tests/testsuite/lto.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -493,8 +493,8 @@ fn cdylib_and_rlib() {
493493
[FRESH] registry-shared v0.0.1
494494
[FRESH] bar v0.0.0 [..]
495495
[COMPILING] foo [..]
496-
[RUNNING] `rustc --crate-name foo [..]-C embed-bitcode=no --test[..]
497-
[RUNNING] `rustc --crate-name a [..]-C embed-bitcode=no --test[..]
496+
[RUNNING] `rustc --crate-name foo [..]-C embed-bitcode=no [..]--test[..]
497+
[RUNNING] `rustc --crate-name a [..]-C embed-bitcode=no [..]--test[..]
498498
[FINISHED] [..]
499499
[RUNNING] [..]
500500
[RUNNING] [..]
@@ -520,8 +520,8 @@ fn cdylib_and_rlib() {
520520
[RUNNING] `rustc --crate-name registry_shared [..]-C embed-bitcode=no[..]
521521
[COMPILING] bar [..]
522522
[RUNNING] `rustc --crate-name bar [..]--crate-type cdylib --crate-type rlib [..]-C embed-bitcode=no[..]
523-
[RUNNING] `rustc --crate-name bar [..]-C embed-bitcode=no --test[..]
524-
[RUNNING] `rustc --crate-name b [..]-C embed-bitcode=no --test[..]
523+
[RUNNING] `rustc --crate-name bar [..]-C embed-bitcode=no [..]--test[..]
524+
[RUNNING] `rustc --crate-name b [..]-C embed-bitcode=no [..]--test[..]
525525
[FINISHED] [..]
526526
[RUNNING] [..]target/release/deps/bar-[..]
527527
[RUNNING] [..]target/release/deps/b-[..]
@@ -552,8 +552,8 @@ fn dylib() {
552552
[FRESH] registry-shared v0.0.1
553553
[FRESH] bar v0.0.0 [..]
554554
[COMPILING] foo [..]
555-
[RUNNING] `rustc --crate-name foo [..]-C embed-bitcode=no --test[..]
556-
[RUNNING] `rustc --crate-name a [..]-C embed-bitcode=no --test[..]
555+
[RUNNING] `rustc --crate-name foo [..]-C embed-bitcode=no [..]--test[..]
556+
[RUNNING] `rustc --crate-name a [..]-C embed-bitcode=no [..]--test[..]
557557
[FINISHED] [..]
558558
[RUNNING] [..]
559559
[RUNNING] [..]
@@ -578,8 +578,8 @@ fn dylib() {
578578
[FRESH] registry-shared v0.0.1
579579
[FRESH] registry v0.0.1
580580
[COMPILING] bar [..]
581-
[RUNNING] `rustc --crate-name bar [..]-C embed-bitcode=no --test[..]
582-
[RUNNING] `rustc --crate-name b [..]-C embed-bitcode=no --test[..]
581+
[RUNNING] `rustc --crate-name bar [..]-C embed-bitcode=no [..]--test[..]
582+
[RUNNING] `rustc --crate-name b [..]-C embed-bitcode=no [..]--test[..]
583583
[FINISHED] [..]
584584
[RUNNING] [..]
585585
[RUNNING] [..]

0 commit comments

Comments
 (0)