diff options
| author | bors <bors@rust-lang.org> | 2014-05-07 06:46:54 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-05-07 06:46:54 -0700 |
| commit | f83cf6cf2acfd46329ccb804d63ad0336a98064b (patch) | |
| tree | 020b8685fd54bb6063186814fbeb1787a728e67d | |
| parent | ef6daf9935da103f1b915a5c9904794da79b0b60 (diff) | |
| parent | 201cd9e3f9e275e7e411d6e2633e59e2d42e478e (diff) | |
| download | rust-f83cf6cf2acfd46329ccb804d63ad0336a98064b.tar.gz rust-f83cf6cf2acfd46329ccb804d63ad0336a98064b.zip | |
auto merge of #13967 : richo/rust/features/ICE-fails, r=alexcrichton
This change makes internal compile errors in the compile-fail tests failures.
I believe this is the correct behaviour- those tests are intended to assert that the compiler doesn't proceed, not that it explodes.
So far, it fails on 4 tests in my environment, my testcase for #13943 which is what caused me to tackle this, and 3 others:
```
failures:
[compile-fail] compile-fail/incompatible-tuple.rs # This one is mine and not on master
[compile-fail] compile-fail/inherit-struct8.rs
[compile-fail] compile-fail/issue-9725.rs
[compile-fail] compile-fail/unsupported-cast.rs
```
| -rw-r--r-- | src/compiletest/runtest.rs | 10 | ||||
| -rw-r--r-- | src/test/compile-fail/inherit-struct8.rs | 3 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-9725.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/unsupported-cast.rs | 1 |
4 files changed, 16 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) { diff --git a/src/test/compile-fail/inherit-struct8.rs b/src/test/compile-fail/inherit-struct8.rs index d1108349db1..858e7f5b6d9 100644 --- a/src/test/compile-fail/inherit-struct8.rs +++ b/src/test/compile-fail/inherit-struct8.rs @@ -8,6 +8,9 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-test FIXME: #13991 + + // Test struct inheritance. #![feature(struct_inherit)] diff --git a/src/test/compile-fail/issue-9725.rs b/src/test/compile-fail/issue-9725.rs index 2a0896380fd..d5c18263c4c 100644 --- a/src/test/compile-fail/issue-9725.rs +++ b/src/test/compile-fail/issue-9725.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-test FIXME: #13992 + struct A { foo: int } fn main() { diff --git a/src/test/compile-fail/unsupported-cast.rs b/src/test/compile-fail/unsupported-cast.rs index fbcad79ac46..1fdba7d8b66 100644 --- a/src/test/compile-fail/unsupported-cast.rs +++ b/src/test/compile-fail/unsupported-cast.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// ignore-test FIXME: #13993 // error-pattern:unsupported cast extern crate libc; |
