Skip to content

Commit

Permalink
Rollup merge of rust-lang#90029 - tgnottingham:incr-debug-logging-tes…
Browse files Browse the repository at this point in the history
…t, r=Mark-Simulacrum

Add test for debug logging during incremental compilation

Debug logging during incremental compilation had been broken for some
time, until rust-lang#89343 fixed it (among other things). Add a test so this is
less likely to break without being noticed. This test is nearly a copy
of the `src/test/ui/rustc-rust-log.rs` test, but tests debug logging in
the incremental compliation code paths.
  • Loading branch information
JohnTitor authored Oct 21, 2021
2 parents 9b5f471 + aefbd40 commit ad8df27
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/test/incremental/auxiliary/rustc-rust-log-aux.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// rustc-env:RUSTC_LOG=debug
#[cfg(rpass1)]
pub fn foo() {}

#[cfg(rpass2)]
pub fn foo() {
println!();
}
16 changes: 16 additions & 0 deletions src/test/incremental/rustc-rust-log.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// revisions: rpass1 rpass2
// This test is just checking that we won't ICE if logging is turned
// on; don't bother trying to compare that (copious) output.
//
// dont-check-compiler-stdout
// dont-check-compiler-stderr
// aux-build: rustc-rust-log-aux.rs
// rustc-env:RUSTC_LOG=debug

#[cfg(rpass1)]
fn main() {}

#[cfg(rpass2)]
fn main() {
println!();
}
5 changes: 1 addition & 4 deletions src/test/ui/rustc-rust-log.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// run-pass
// This test is just checking that we won't ICE if logging is turned
// on; don't bother trying to compare that (copious) output. (Note
// also that this test potentially silly, since we do not build+test
// debug versions of rustc as part of our continuous integration
// process...)
// on; don't bother trying to compare that (copious) output.
//
// dont-check-compiler-stdout
// dont-check-compiler-stderr
Expand Down

0 comments on commit ad8df27

Please sign in to comment.