diff options
| author | Tyson Nottingham <tgnottingham@gmail.com> | 2021-10-18 14:00:29 -0700 |
|---|---|---|
| committer | Tyson Nottingham <tgnottingham@gmail.com> | 2021-10-18 16:28:10 -0700 |
| commit | aefbd401408769fbca1c486546b8dc3fce9e0d9b (patch) | |
| tree | c577c0899d55fd052d096b1376dcd6ca268471e6 | |
| parent | 93f80bff940c4269e18836b3f4c5cefed19b361a (diff) | |
| download | rust-aefbd401408769fbca1c486546b8dc3fce9e0d9b.tar.gz rust-aefbd401408769fbca1c486546b8dc3fce9e0d9b.zip | |
Add test for debug logging during incremental compilation
Debug logging during incremental compilation had been broken for some time, until #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.
| -rw-r--r-- | src/test/incremental/auxiliary/rustc-rust-log-aux.rs | 8 | ||||
| -rw-r--r-- | src/test/incremental/rustc-rust-log.rs | 16 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/test/incremental/auxiliary/rustc-rust-log-aux.rs b/src/test/incremental/auxiliary/rustc-rust-log-aux.rs new file mode 100644 index 00000000000..a361373dc19 --- /dev/null +++ b/src/test/incremental/auxiliary/rustc-rust-log-aux.rs @@ -0,0 +1,8 @@ +// rustc-env:RUSTC_LOG=debug +#[cfg(rpass1)] +pub fn foo() {} + +#[cfg(rpass2)] +pub fn foo() { + println!(); +} diff --git a/src/test/incremental/rustc-rust-log.rs b/src/test/incremental/rustc-rust-log.rs new file mode 100644 index 00000000000..566f0d96d97 --- /dev/null +++ b/src/test/incremental/rustc-rust-log.rs @@ -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!(); +} |
