diff options
| author | Ahmed Charles <acharles@outlook.com> | 2016-08-22 16:51:37 -0700 |
|---|---|---|
| committer | Ahmed Charles <acharles@outlook.com> | 2016-08-22 16:51:37 -0700 |
| commit | 6961d267298b6ca0507520de5541883374d31302 (patch) | |
| tree | 51012dc2bb2600032c0ba8141f91665abeb744a9 /src/tools | |
| parent | 197be89f367d1240d5f9cd9c4efd77812775354e (diff) | |
| download | rust-6961d267298b6ca0507520de5541883374d31302.tar.gz rust-6961d267298b6ca0507520de5541883374d31302.zip | |
Fix compiletest so it respects warnings for run-pass.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 0d081b267bb..60a0d8f0b86 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -197,6 +197,11 @@ impl<'test> TestCx<'test> { self.fatal_proc_rec("compilation failed!", &proc_res); } + let expected_errors = errors::load_errors(&self.testpaths.file, self.revision); + if !expected_errors.is_empty() { + self.check_expected_errors(expected_errors, &proc_res); + } + let proc_res = self.exec_compiled_test(); if !proc_res.status.success() { @@ -992,7 +997,8 @@ actual:\n\ fn check_expected_errors(&self, expected_errors: Vec<errors::Error>, proc_res: &ProcRes) { - if proc_res.status.success() { + if proc_res.status.success() && + expected_errors.iter().any(|x| x.kind == Some(ErrorKind::Error)) { self.fatal_proc_rec("process did not return an error status", proc_res); } @@ -1320,6 +1326,7 @@ actual:\n\ match self.config.mode { CompileFail | ParseFail | + RunPass | Incremental => { // If we are extracting and matching errors in the new // fashion, then you want JSON mode. Old-skool error @@ -1350,7 +1357,6 @@ actual:\n\ args.push(dir_opt); } RunFail | - RunPass | RunPassValgrind | Pretty | DebugInfoGdb | |
