summary refs log tree commit diff
path: root/src/libtest
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2019-10-02 11:02:25 -0700
committerThomas Lively <tlively@google.com>2019-10-04 00:47:21 -0700
commit5b56c660c9cf55b240d26854fa0ffd41db068ff9 (patch)
tree03bc9b23e0f08f0f94054e85d64672a769c7e339 /src/libtest
parent9a55103b985fdd4a7d90db5d46ebaf0a9e34b419 (diff)
downloadrust-5b56c660c9cf55b240d26854fa0ffd41db068ff9.tar.gz
rust-5b56c660c9cf55b240d26854fa0ffd41db068ff9.zip
Fix ABI, run and fix more tests, re-enable CI for PRs
Diffstat (limited to 'src/libtest')
-rw-r--r--src/libtest/lib.rs6
-rw-r--r--src/libtest/tests.rs11
2 files changed, 13 insertions, 4 deletions
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
index 8b76080fc68..e8f3434b958 100644
--- a/src/libtest/lib.rs
+++ b/src/libtest/lib.rs
@@ -1478,9 +1478,9 @@ pub fn run_test(
 ) {
     let TestDescAndFn { desc, testfn } = test;
 
-    let ignore_because_no_process_support = cfg!(target_arch = "wasm32")
-        && !cfg!(target_os = "emscripten")
-        && desc.should_panic != ShouldPanic::No;
+    // FIXME: Re-enable emscripten once it can catch panics again
+    let ignore_because_no_process_support = desc.should_panic != ShouldPanic::No
+        && (cfg!(target_arch = "wasm32") || cfg!(target_os = "emscripten"));
 
     if force_ignore || desc.ignore || ignore_because_no_process_support {
         monitor_ch.send((desc, TrIgnored, None, Vec::new())).unwrap();
diff --git a/src/libtest/tests.rs b/src/libtest/tests.rs
index b95fb5df710..c3727b3013f 100644
--- a/src/libtest/tests.rs
+++ b/src/libtest/tests.rs
@@ -2,7 +2,7 @@ use super::*;
 
 use crate::test::{
     filter_tests, parse_opts, run_test, DynTestFn, DynTestName, MetricMap, RunIgnored, RunStrategy,
-    ShouldPanic, StaticTestName, TestDesc, TestDescAndFn, TestOpts, TrFailedMsg,
+    ShouldPanic, StaticTestName, TestDesc, TestDescAndFn, TestOpts,
     TrIgnored, TrOk,
 };
 use std::sync::mpsc::channel;
@@ -90,7 +90,9 @@ pub fn ignored_tests_result_in_ignored() {
     assert!(res == TrIgnored);
 }
 
+// FIXME: Re-enable emscripten once it can catch panics again
 #[test]
+#[cfg(not(target_os = "emscripten"))]
 fn test_should_panic() {
     fn f() {
         panic!();
@@ -110,7 +112,9 @@ fn test_should_panic() {
     assert!(res == TrOk);
 }
 
+// FIXME: Re-enable emscripten once it can catch panics again
 #[test]
+#[cfg(not(target_os = "emscripten"))]
 fn test_should_panic_good_message() {
     fn f() {
         panic!("an error message");
@@ -130,8 +134,11 @@ fn test_should_panic_good_message() {
     assert!(res == TrOk);
 }
 
+// FIXME: Re-enable emscripten once it can catch panics again
 #[test]
+#[cfg(not(target_os = "emscripten"))]
 fn test_should_panic_bad_message() {
+    use crate::tests::TrFailedMsg;
     fn f() {
         panic!("an error message");
     }
@@ -152,7 +159,9 @@ fn test_should_panic_bad_message() {
     assert!(res == TrFailedMsg(format!("{} '{}'", failed_msg, expected)));
 }
 
+// FIXME: Re-enable emscripten once it can catch panics again
 #[test]
+#[cfg(not(target_os = "emscripten"))]
 fn test_should_panic_but_succeeds() {
     fn f() {}
     let desc = TestDescAndFn {