Skip to content

Commit aefbd40

Browse files
committed
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.
1 parent 93f80bf commit aefbd40

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

Diff for: src/test/incremental/auxiliary/rustc-rust-log-aux.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// rustc-env:RUSTC_LOG=debug
2+
#[cfg(rpass1)]
3+
pub fn foo() {}
4+
5+
#[cfg(rpass2)]
6+
pub fn foo() {
7+
println!();
8+
}

Diff for: src/test/incremental/rustc-rust-log.rs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// revisions: rpass1 rpass2
2+
// This test is just checking that we won't ICE if logging is turned
3+
// on; don't bother trying to compare that (copious) output.
4+
//
5+
// dont-check-compiler-stdout
6+
// dont-check-compiler-stderr
7+
// aux-build: rustc-rust-log-aux.rs
8+
// rustc-env:RUSTC_LOG=debug
9+
10+
#[cfg(rpass1)]
11+
fn main() {}
12+
13+
#[cfg(rpass2)]
14+
fn main() {
15+
println!();
16+
}

0 commit comments

Comments
 (0)