Skip to content

Commit 6b56933

Browse files
committed
bootstrap: Ignore rust.debuginfo-level-tests for codegen tests
codegen tests typically depend on the raw LLVM IR output and are sensitive to debuginfo level. So do not apply `rust.debuginfo-level-tests` for codegen tests. Before this commit: $ ./x test --set rust.debuginfo-level-tests=2 tests/codegen --force-rerun test result: FAILED. 654 passed; 136 failed; 75 ignored; 0 measured; 0 filtered out; finished in 3.22s After this commit: $ ./x test --set rust.debuginfo-level-tests=2 tests/codegen --force-rerun test result: ok. 790 passed; 0 failed; 75 ignored; 0 measured; 0 filtered out; finished in 3.21s
1 parent e466296 commit 6b56933

File tree

1 file changed

+10
-1
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+10
-1
lines changed

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1810,7 +1810,16 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
18101810
}
18111811

18121812
let mut flags = if is_rustdoc { Vec::new() } else { vec!["-Crpath".to_string()] };
1813-
flags.push(format!("-Cdebuginfo={}", builder.config.rust_debuginfo_level_tests));
1813+
flags.push(format!(
1814+
"-Cdebuginfo={}",
1815+
if suite == "codegen" {
1816+
// codegen tests typically check LLVM IR and are sensitive to additional debuginfo.
1817+
// So do not apply `rust_debuginfo_level_tests` for codegen tests.
1818+
crate::core::config::DebuginfoLevel::None
1819+
} else {
1820+
builder.config.rust_debuginfo_level_tests
1821+
}
1822+
));
18141823
flags.extend(builder.config.cmd.compiletest_rustc_args().iter().map(|s| s.to_string()));
18151824

18161825
if suite != "mir-opt" {

0 commit comments

Comments
 (0)