Skip to content

Commit

Permalink
Ignore should_panic tests on android
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Mark-Simulacrum committed Mar 3, 2019
1 parent c0086b9 commit 1055263
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,22 @@ impl Config {
let default = config.channel == "dev";
config.ignore_git = ignore_git.unwrap_or(default);

// Disable should_panic tests on Android targets. Panic in tests currently means a potential
// segfault could occur on Android, which will spuriously fail our CI.
//
// See #55861 for more information.
if config.targets.iter().any(|target| target.contains("android")) {
if let Subcommand::Test { test_args, .. } |
Subcommand::Bench { test_args, .. } = &mut config.cmd {
if !test_args.contains(&String::from("-Zunstable-options")) {
test_args.push(String::from("-Zunstable-options"));
}
if !test_args.contains(&String::from("--exclude-should-panic")) {
test_args.push(String::from("--exclude-should-panic"));
}
}
}

config
}

Expand Down

0 comments on commit 1055263

Please sign in to comment.