From 76ceeddb2b6fd4589cf8292d8dafa65a91ace019 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 6 Sep 2018 14:36:26 +0200 Subject: Migrated remaining `src/test/run-pass/` subdirectories to `src/test/ui/run-pass/`. --- .../abort-link-to-unwinding-crates.rs | 48 -------------------- src/test/run-pass/panic-runtime/abort.rs | 51 ---------------------- .../auxiliary/exit-success-if-unwind.rs | 26 ----------- src/test/run-pass/panic-runtime/link-to-abort.rs | 19 -------- src/test/run-pass/panic-runtime/link-to-unwind.rs | 18 -------- src/test/run-pass/panic-runtime/lto-abort.rs | 41 ----------------- src/test/run-pass/panic-runtime/lto-unwind.rs | 43 ------------------ 7 files changed, 246 deletions(-) delete mode 100644 src/test/run-pass/panic-runtime/abort-link-to-unwinding-crates.rs delete mode 100644 src/test/run-pass/panic-runtime/abort.rs delete mode 100644 src/test/run-pass/panic-runtime/auxiliary/exit-success-if-unwind.rs delete mode 100644 src/test/run-pass/panic-runtime/link-to-abort.rs delete mode 100644 src/test/run-pass/panic-runtime/link-to-unwind.rs delete mode 100644 src/test/run-pass/panic-runtime/lto-abort.rs delete mode 100644 src/test/run-pass/panic-runtime/lto-unwind.rs (limited to 'src/test/run-pass/panic-runtime') diff --git a/src/test/run-pass/panic-runtime/abort-link-to-unwinding-crates.rs b/src/test/run-pass/panic-runtime/abort-link-to-unwinding-crates.rs deleted file mode 100644 index 731603606e4..00000000000 --- a/src/test/run-pass/panic-runtime/abort-link-to-unwinding-crates.rs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// compile-flags:-C panic=abort -// aux-build:exit-success-if-unwind.rs -// no-prefer-dynamic -// ignore-cloudabi no processes -// ignore-emscripten no processes -// ignore-macos - -extern crate exit_success_if_unwind; - -use std::process::Command; -use std::env; - -fn main() { - let mut args = env::args_os(); - let me = args.next().unwrap(); - - if let Some(s) = args.next() { - if &*s == "foo" { - exit_success_if_unwind::bar(do_panic); - } - } - - 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)); -} - -fn do_panic() { - panic!("try to catch me"); -} diff --git a/src/test/run-pass/panic-runtime/abort.rs b/src/test/run-pass/panic-runtime/abort.rs deleted file mode 100644 index 4692ad3ca2f..00000000000 --- a/src/test/run-pass/panic-runtime/abort.rs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// compile-flags:-C panic=abort -// no-prefer-dynamic -// ignore-cloudabi no processes -// ignore-emscripten no processes -// ignore-macos - -use std::process::Command; -use std::env; - -struct Bomb; - -impl Drop for Bomb { - fn drop(&mut self) { - std::process::exit(0); - } -} - -fn main() { - let mut args = env::args_os(); - let me = args.next().unwrap(); - - if let Some(s) = args.next() { - if &*s == "foo" { - - let _bomb = Bomb; - - panic!("try to catch me"); - } - } - - 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)); -} diff --git a/src/test/run-pass/panic-runtime/auxiliary/exit-success-if-unwind.rs b/src/test/run-pass/panic-runtime/auxiliary/exit-success-if-unwind.rs deleted file mode 100644 index 9e5fc592b1a..00000000000 --- a/src/test/run-pass/panic-runtime/auxiliary/exit-success-if-unwind.rs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// no-prefer-dynamic - -#![crate_type = "rlib"] - -struct Bomb; - -impl Drop for Bomb { - fn drop(&mut self) { - std::process::exit(0); - } -} - -pub fn bar(f: fn()) { - let _bomb = Bomb; - f(); -} diff --git a/src/test/run-pass/panic-runtime/link-to-abort.rs b/src/test/run-pass/panic-runtime/link-to-abort.rs deleted file mode 100644 index 9f5407e4526..00000000000 --- a/src/test/run-pass/panic-runtime/link-to-abort.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// compile-flags:-C panic=abort -// no-prefer-dynamic -// ignore-macos - -#![feature(panic_abort)] - -extern crate panic_abort; - -fn main() {} diff --git a/src/test/run-pass/panic-runtime/link-to-unwind.rs b/src/test/run-pass/panic-runtime/link-to-unwind.rs deleted file mode 100644 index dec8f738d32..00000000000 --- a/src/test/run-pass/panic-runtime/link-to-unwind.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// no-prefer-dynamic - -#![feature(panic_unwind)] - -extern crate panic_unwind; - -fn main() { -} diff --git a/src/test/run-pass/panic-runtime/lto-abort.rs b/src/test/run-pass/panic-runtime/lto-abort.rs deleted file mode 100644 index 54e02fb6975..00000000000 --- a/src/test/run-pass/panic-runtime/lto-abort.rs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// compile-flags:-C lto -C panic=abort -// no-prefer-dynamic -// ignore-cloudabi no processes -// ignore-emscripten no processes - -use std::process::Command; -use std::env; - -struct Bomb; - -impl Drop for Bomb { - fn drop(&mut self) { - std::process::exit(0); - } -} - -fn main() { - let mut args = env::args_os(); - let me = args.next().unwrap(); - - if let Some(s) = args.next() { - if &*s == "foo" { - - let _bomb = Bomb; - - panic!("try to catch me"); - } - } - let s = Command::new(env::args_os().next().unwrap()).arg("foo").status(); - assert!(s.unwrap().code() != Some(0)); -} diff --git a/src/test/run-pass/panic-runtime/lto-unwind.rs b/src/test/run-pass/panic-runtime/lto-unwind.rs deleted file mode 100644 index 52f10688f14..00000000000 --- a/src/test/run-pass/panic-runtime/lto-unwind.rs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// compile-flags:-C lto -C panic=unwind -// no-prefer-dynamic -// ignore-cloudabi no processes -// ignore-emscripten no processes - -use std::process::Command; -use std::env; - -struct Bomb; - -impl Drop for Bomb { - fn drop(&mut self) { - println!("hurray you ran me"); - } -} - -fn main() { - let mut args = env::args_os(); - let me = args.next().unwrap(); - - if let Some(s) = args.next() { - if &*s == "foo" { - - let _bomb = Bomb; - - panic!("try to catch me"); - } - } - let s = Command::new(env::args_os().next().unwrap()).arg("foo").output(); - let s = s.unwrap(); - assert!(!s.status.success()); - assert!(String::from_utf8_lossy(&s.stdout).contains("hurray you ran me")); -} -- cgit 1.4.1-3-g733a5