diff options
| author | Hameer Abbasi <einstein.edison@gmail.com> | 2021-03-31 15:30:07 +0000 |
|---|---|---|
| committer | Hameer Abbasi <einstein.edison@gmail.com> | 2021-03-31 15:30:07 +0000 |
| commit | 38b31691a7c6124ae4e48809ee9e083c1ca1f635 (patch) | |
| tree | f7d0fae257ace5fd2debde6b088ace5720ebe033 /src/tools/compiletest | |
| parent | f80b9acf204888585b254e760d13ac4c37af2254 (diff) | |
| download | rust-38b31691a7c6124ae4e48809ee9e083c1ca1f635.tar.gz rust-38b31691a7c6124ae4e48809ee9e083c1ca1f635.zip | |
Fix compiletest to use correct bitwidth stderr files.
Diffstat (limited to 'src/tools/compiletest')
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 1a49b1e7b17..7e6c21b824d 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -3140,8 +3140,14 @@ impl<'test> TestCx<'test> { output_kind: TestOutput, explicit_format: bool, ) -> usize { + let stderr_bits = format!("{}.stderr", get_pointer_width(&self.config.target)); let (stderr_kind, stdout_kind) = match output_kind { - TestOutput::Compile => (UI_STDERR, UI_STDOUT), + TestOutput::Compile => ( + { + if self.props.stderr_per_bitwidth { &stderr_bits } else { UI_STDERR } + }, + UI_STDOUT, + ), TestOutput::Run => (UI_RUN_STDERR, UI_RUN_STDOUT), }; @@ -3181,15 +3187,12 @@ impl<'test> TestCx<'test> { match output_kind { TestOutput::Compile => { if !self.props.dont_check_compiler_stdout { - errors += self.compare_output("stdout", &normalized_stdout, &expected_stdout); + errors += + self.compare_output(stdout_kind, &normalized_stdout, &expected_stdout); } if !self.props.dont_check_compiler_stderr { - let kind = if self.props.stderr_per_bitwidth { - format!("{}.stderr", get_pointer_width(&self.config.target)) - } else { - String::from("stderr") - }; - errors += self.compare_output(&kind, &normalized_stderr, &expected_stderr); + errors += + self.compare_output(stderr_kind, &normalized_stderr, &expected_stderr); } } TestOutput::Run => { |
