Skip to content

Commit

Permalink
FIN: disable backtrace printing for panic-runtime/abort* on ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
TimNN committed Apr 23, 2017
1 parent a0ce63b commit a146431
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
Expand Up @@ -27,7 +27,17 @@ fn main() {
exit_success_if_unwind::bar(do_panic);
}
}
let s = Command::new(env::args_os().next().unwrap()).arg("foo").status();

let mut cmd = Command::new(env::args_os().next().unwrap());
cmd.arg("foo");


// ARMv6 hanges while printing the backtrace, see #41004
if cfg!(target_arch = "arm") && cfg!(target_env = "gnu") {
cmd.env("RUST_BACKTRACE", "0");
}

let s = cmd.status();
assert!(s.unwrap().code() != Some(0));
}

Expand Down
11 changes: 10 additions & 1 deletion src/test/run-pass/panic-runtime/abort.rs
Expand Up @@ -35,6 +35,15 @@ fn main() {
panic!("try to catch me");
}
}
let s = Command::new(env::args_os().next().unwrap()).arg("foo").status();

let mut cmd = Command::new(env::args_os().next().unwrap());
cmd.arg("foo");

// ARMv6 hanges while printing the backtrace, see #41004
if cfg!(target_arch = "arm") && cfg!(target_env = "gnu") {
cmd.env("RUST_BACKTRACE", "0");
}

let s = cmd.status();
assert!(s.unwrap().code() != Some(0));
}

0 comments on commit a146431

Please sign in to comment.