diff options
| author | bors <bors@rust-lang.org> | 2016-08-27 12:31:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-27 12:31:25 -0700 |
| commit | a23064af5ec7f52b287e2c60823fed92a4763502 (patch) | |
| tree | 494ef2078f14401a7324d735b99faad9ef827864 /src/tools | |
| parent | 11946956a6352f49c6aadc1c13c39757a046e0c2 (diff) | |
| parent | 6961d267298b6ca0507520de5541883374d31302 (diff) | |
| download | rust-a23064af5ec7f52b287e2c60823fed92a4763502.tar.gz rust-a23064af5ec7f52b287e2c60823fed92a4763502.zip | |
Auto merge of #35674 - ahmedcharles:rpass, r=alexcrichton
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 | |
