Skip to content

Commit 5558cd1

Browse files
committed
invalid stdout_utf8 handling in run_make_support
1 parent 6848ab8 commit 5558cd1

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Diff for: src/tools/run-make-support/src/command.rs

+6
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,12 @@ impl CompletedProcess {
167167
String::from_utf8(self.output.stdout.clone()).expect("stdout is not valid UTF-8")
168168
}
169169

170+
#[must_use]
171+
#[track_caller]
172+
pub fn invalid_stdout_utf8(&self) -> String {
173+
String::from_utf8_lossy(&self.output.stdout.clone()).to_string()
174+
}
175+
170176
#[must_use]
171177
#[track_caller]
172178
pub fn stderr_utf8(&self) -> String {

Diff for: tests/run-make/symbol-visibility/rmake.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ fn main() {
142142

143143
#[track_caller]
144144
fn symbols_check(path: &str, symbol_check_type: SymbolCheckType, exists_once: bool) {
145-
let out = llvm_readobj().arg("--dyn-symbols").input(path).run().stdout_utf8();
145+
let out = llvm_readobj().arg("--dyn-symbols").input(path).run().invalid_stdout_utf8();
146146
assert_eq!(
147147
out.lines()
148148
.filter(|&line| !line.contains("__imp_") && has_symbol(line, symbol_check_type))

0 commit comments

Comments
 (0)