diff options
| -rw-r--r-- | src/tools/run-make-support/src/command.rs | 6 | ||||
| -rw-r--r-- | tests/run-make/symbol-visibility/rmake.rs | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/tools/run-make-support/src/command.rs b/src/tools/run-make-support/src/command.rs index 86d2e4a852a..532e3b8e048 100644 --- a/src/tools/run-make-support/src/command.rs +++ b/src/tools/run-make-support/src/command.rs @@ -170,6 +170,12 @@ impl CompletedProcess { #[must_use] #[track_caller] + pub fn invalid_stdout_utf8(&self) -> String { + String::from_utf8_lossy(&self.output.stdout.clone()).to_string() + } + + #[must_use] + #[track_caller] pub fn stderr_utf8(&self) -> String { String::from_utf8(self.output.stderr.clone()).expect("stderr is not valid UTF-8") } diff --git a/tests/run-make/symbol-visibility/rmake.rs b/tests/run-make/symbol-visibility/rmake.rs index 5fff89e071e..cd085cf05d0 100644 --- a/tests/run-make/symbol-visibility/rmake.rs +++ b/tests/run-make/symbol-visibility/rmake.rs @@ -142,7 +142,7 @@ fn main() { #[track_caller] fn symbols_check(path: &str, symbol_check_type: SymbolCheckType, exists_once: bool) { - let out = llvm_readobj().arg("--dyn-symbols").input(path).run().stdout_utf8(); + let out = llvm_readobj().arg("--dyn-symbols").input(path).run().invalid_stdout_utf8(); assert_eq!( out.lines() .filter(|&line| !line.contains("__imp_") && has_symbol(line, symbol_check_type)) |
