Skip to content

Commit 38b3169

Browse files
committed
Fix compiletest to use correct bitwidth stderr files.
1 parent f80b9ac commit 38b3169

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/tools/compiletest/src/runtest.rs

+11-8
Original file line numberDiff line numberDiff line change
@@ -3140,8 +3140,14 @@ impl<'test> TestCx<'test> {
31403140
output_kind: TestOutput,
31413141
explicit_format: bool,
31423142
) -> usize {
3143+
let stderr_bits = format!("{}.stderr", get_pointer_width(&self.config.target));
31433144
let (stderr_kind, stdout_kind) = match output_kind {
3144-
TestOutput::Compile => (UI_STDERR, UI_STDOUT),
3145+
TestOutput::Compile => (
3146+
{
3147+
if self.props.stderr_per_bitwidth { &stderr_bits } else { UI_STDERR }
3148+
},
3149+
UI_STDOUT,
3150+
),
31453151
TestOutput::Run => (UI_RUN_STDERR, UI_RUN_STDOUT),
31463152
};
31473153

@@ -3181,15 +3187,12 @@ impl<'test> TestCx<'test> {
31813187
match output_kind {
31823188
TestOutput::Compile => {
31833189
if !self.props.dont_check_compiler_stdout {
3184-
errors += self.compare_output("stdout", &normalized_stdout, &expected_stdout);
3190+
errors +=
3191+
self.compare_output(stdout_kind, &normalized_stdout, &expected_stdout);
31853192
}
31863193
if !self.props.dont_check_compiler_stderr {
3187-
let kind = if self.props.stderr_per_bitwidth {
3188-
format!("{}.stderr", get_pointer_width(&self.config.target))
3189-
} else {
3190-
String::from("stderr")
3191-
};
3192-
errors += self.compare_output(&kind, &normalized_stderr, &expected_stderr);
3194+
errors +=
3195+
self.compare_output(stderr_kind, &normalized_stderr, &expected_stderr);
31933196
}
31943197
}
31953198
TestOutput::Run => {

0 commit comments

Comments
 (0)