Skip to content

Commit 5753b9e

Browse files
authored
Rollup merge of rust-lang#58900 - Mark-Simulacrum:ignore-should-panic-android, r=kennytm
Ignore should_panic tests on android These tests currently segfault sometimes. Android is a tier-2 target so this is fine to disable instead of fixing. Unfortunately, this isn't quite enough as rustdoc doesn't currently correctly interpret the --exclude-should-panic flag (i.e., ignores it). That proved to be harder to fix than I had time for so we're going to leave it and hope that at least some of the failures are fixed. Hopefully alleviates rust-lang#55861; I don't have the time to investigate fixing rustdoc.
2 parents 9a0a16a + 1055263 commit 5753b9e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/bootstrap/config.rs

+16
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,22 @@ impl Config {
650650
let default = config.channel == "dev";
651651
config.ignore_git = ignore_git.unwrap_or(default);
652652

653+
// Disable should_panic tests on Android targets. Panic in tests currently means a potential
654+
// segfault could occur on Android, which will spuriously fail our CI.
655+
//
656+
// See #55861 for more information.
657+
if config.targets.iter().any(|target| target.contains("android")) {
658+
if let Subcommand::Test { test_args, .. } |
659+
Subcommand::Bench { test_args, .. } = &mut config.cmd {
660+
if !test_args.contains(&String::from("-Zunstable-options")) {
661+
test_args.push(String::from("-Zunstable-options"));
662+
}
663+
if !test_args.contains(&String::from("--exclude-should-panic")) {
664+
test_args.push(String::from("--exclude-should-panic"));
665+
}
666+
}
667+
}
668+
653669
config
654670
}
655671

0 commit comments

Comments
 (0)