2 #![allow(unused_variables)]
3 // compile-flags:-C panic=abort
4 // aux-build:exit-success-if-unwind.rs
6 // ignore-emscripten no processes
7 // ignore-sgx no processes
10 extern crate exit_success_if_unwind;
12 use std::process::Command;
16 let mut args = env::args_os();
17 let me = args.next().unwrap();
19 if let Some(s) = args.next() {
21 exit_success_if_unwind::bar(do_panic);
25 let mut cmd = Command::new(env::args_os().next().unwrap());
29 // ARMv6 hanges while printing the backtrace, see #41004
30 if cfg!(target_arch = "arm") && cfg!(target_env = "gnu") {
31 cmd.env("RUST_BACKTRACE", "0");
35 assert!(s.unwrap().code() != Some(0));
39 panic!("try to catch me");