about summary refs log tree commit diff
path: root/src/tools/compiletest
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-09-23 06:17:26 -0700
committerGitHub <noreply@github.com>2016-09-23 06:17:26 -0700
commit86a686c4f71d208ecf8f7ee5a035b17a545d8b62 (patch)
tree5b80ce533d2d35b42bd0126dc59e5c9ecf796abc /src/tools/compiletest
parentf2c53ea66bc1491ef125b35fa30c1cc890cde82c (diff)
parentbfa34332833962e4991f508ac3ab4958fd9b64cd (diff)
downloadrust-86a686c4f71d208ecf8f7ee5a035b17a545d8b62.tar.gz
rust-86a686c4f71d208ecf8f7ee5a035b17a545d8b62.zip
Auto merge of #36335 - mcarton:compiletest, r=GuillaumeGomez
Fix ICE test in compiletest fail-tests

While working on Clippy which uses *compiletest*, I noticed that as long as all expected error are found, *compile-fail* tests will be marked *ok* even if there is an ICE. One function seems to have not been updated with JSON errors because ICEs are now reported like this:
```json
{"message":"../src/librustc/ty/context.rs:161: Attempted to intern `_` which contains inference types/regions in the global type context","code":null,"level":"error: internal compiler error","spans":[],"children":[],"rendered":null}
```
I don't think I can add a test for that.

I guess:
r? @nikomatsakis
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 bfb85dd479d..34d86a65700 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -978,7 +978,7 @@ actual:\n\
 
     fn check_no_compiler_crash(&self, proc_res: &ProcRes) {
         for line in proc_res.stderr.lines() {
-            if line.starts_with("error: internal compiler error:") {
+            if line.contains("error: internal compiler error") {
                 self.fatal_proc_rec("compiler encountered internal error", proc_res);
             }
         }