about summary refs log tree commit diff
path: root/src/compiletest
diff options
context:
space:
mode:
authorRicho Healey <richo@psych0tik.net>2014-05-06 01:33:24 -0700
committerRicho Healey <richo@psych0tik.net>2014-05-06 21:47:21 -0700
commit48b1a45cbcbb5684fa1403e9555a4e409863ff14 (patch)
tree6e47fa8bc4e0f380f03187e9d18c544d9d28ea96 /src/compiletest
parent0605f05e42dfe4476500b4341a5ba78398b02c0f (diff)
downloadrust-48b1a45cbcbb5684fa1403e9555a4e409863ff14.tar.gz
rust-48b1a45cbcbb5684fa1403e9555a4e409863ff14.zip
Fail on internal compiler errors in compile-fail
Diffstat (limited to 'src/compiletest')
-rw-r--r--src/compiletest/runtest.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs
index 9ce81c5bae5..c1ca27c805c 100644
--- a/src/compiletest/runtest.rs
+++ b/src/compiletest/runtest.rs
@@ -89,6 +89,7 @@ fn run_cfail_test(config: &config, props: &TestProps, testfile: &Path) {
     } else {
         check_error_patterns(props, testfile, &proc_res);
     }
+    check_no_compiler_crash(&proc_res);
 }
 
 fn run_rfail_test(config: &config, props: &TestProps, testfile: &Path) {
@@ -505,6 +506,15 @@ fn check_error_patterns(props: &TestProps,
     }
 }
 
+fn check_no_compiler_crash(proc_res: &ProcRes) {
+    for line in proc_res.stderr.lines() {
+        if line.starts_with("error: internal compiler error:") {
+            fatal_ProcRes("compiler encountered internal error".to_owned(),
+                          proc_res);
+        }
+    }
+}
+
 fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
                          testfile: &Path,
                          proc_res: &ProcRes) {