about summary refs log tree commit diff
path: root/src/tools/compiletest
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-02-11 05:05:11 +0800
committerkennytm <kennytm@gmail.com>2018-02-13 22:48:16 +0800
commit7984c895b6995703254035e81d0a85ae1fa9fe2b (patch)
tree5ecc1324cd524185940419cebf3c37beaffc2186 /src/tools/compiletest
parent4d2d3fc5dadf894a8ad709a5860a549f2c0b1032 (diff)
downloadrust-7984c895b6995703254035e81d0a85ae1fa9fe2b.tar.gz
rust-7984c895b6995703254035e81d0a85ae1fa9fe2b.zip
Improve debuggability of #48116.
1. When the invalid condition is hit, write out the relevant variables too
2. In compile-fail/parse-fail tests, check for ICE first, so the invalid
   error patterns won't mask our ICE output.
Diffstat (limited to 'src/tools/compiletest')
-rw-r--r--src/tools/compiletest/src/runtest.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index a87809dd7bc..bef085e17ea 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -250,6 +250,7 @@ impl<'test> TestCx<'test> {
     fn run_cfail_test(&self) {
         let proc_res = self.compile_test();
         self.check_if_test_should_compile(&proc_res);
+        self.check_no_compiler_crash(&proc_res);
 
         let output_to_check = self.get_output(&proc_res);
         let expected_errors = errors::load_errors(&self.testpaths.file, self.revision);
@@ -262,7 +263,6 @@ impl<'test> TestCx<'test> {
             self.check_error_patterns(&output_to_check, &proc_res);
         }
 
-        self.check_no_compiler_crash(&proc_res);
         self.check_forbid_output(&output_to_check, &proc_res);
     }