Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions tests/testsuite/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4840,6 +4840,9 @@ fn close_output() {

[lib]
proc-macro = true

[[bin]]
name = "foobar"
"#,
)
.file(
Expand All @@ -4864,15 +4867,14 @@ fn close_output() {
} else {
println!("{}", i);
}
std::thread::sleep(std::time::Duration::new(0, 1));
}
TokenStream::new()
}
"#
.replace("__ADDR__", &addr.to_string()),
)
.file(
"src/main.rs",
"src/bin/foobar.rs",
r#"
foo::repro!();

Expand Down Expand Up @@ -4913,19 +4915,27 @@ fn close_output() {
};

let stderr = spawn(false);
lines_match(
"\
assert!(
lines_match(
"\
[COMPILING] foo [..]
hello stderr!
[ERROR] [..]
[WARNING] build failed, waiting for other jobs to finish...
[ERROR] build failed
",
&stderr,
&stderr,
),
"lines differ:\n{}",
stderr
);

// Try again with stderr.
p.build_dir().rm_rf();
let stdout = spawn(true);
lines_match("hello_stdout!", &stdout);
assert!(
lines_match("hello stdout!\n", &stdout),
"lines differ:\n{}",
stdout
);
}