about summary refs log tree commit diff
path: root/src/test/run-pass/panic-runtime
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2018-09-06 14:36:26 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2018-09-06 14:36:26 +0200
commit76ceeddb2b6fd4589cf8292d8dafa65a91ace019 (patch)
tree11106836a5a37fc73a209a905786431ea0f10117 /src/test/run-pass/panic-runtime
parent20ca02569ae3e1dc29962e92739fbab632abf241 (diff)
downloadrust-76ceeddb2b6fd4589cf8292d8dafa65a91ace019.tar.gz
rust-76ceeddb2b6fd4589cf8292d8dafa65a91ace019.zip
Migrated remaining `src/test/run-pass/` subdirectories to `src/test/ui/run-pass/`.
Diffstat (limited to 'src/test/run-pass/panic-runtime')
-rw-r--r--src/test/run-pass/panic-runtime/abort-link-to-unwinding-crates.rs48
-rw-r--r--src/test/run-pass/panic-runtime/abort.rs51
-rw-r--r--src/test/run-pass/panic-runtime/auxiliary/exit-success-if-unwind.rs26
-rw-r--r--src/test/run-pass/panic-runtime/link-to-abort.rs19
-rw-r--r--src/test/run-pass/panic-runtime/link-to-unwind.rs18
-rw-r--r--src/test/run-pass/panic-runtime/lto-abort.rs41
-rw-r--r--src/test/run-pass/panic-runtime/lto-unwind.rs43
7 files changed, 0 insertions, 246 deletions
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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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"));
-}