Skip to content

Commit b299879

Browse files
committed
Add a way to enable tracing in tests
1 parent 0165b03 commit b299879

File tree

3 files changed

+103
-0
lines changed

3 files changed

+103
-0
lines changed

compiler/base/orchestrator/Cargo.lock

Lines changed: 89 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compiler/base/orchestrator/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ tracing = { version = "0.1.37", default-features = false, features = ["attribute
2323
assert_matches = "1.5.0"
2424
assertables = "7.0.1"
2525
tempdir = "0.3.7"
26+
tracing-subscriber = "0.3.17"

compiler/base/orchestrator/src/coordinator.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,19 @@ mod tests {
13651365

13661366
use super::*;
13671367

1368+
#[allow(dead_code)]
1369+
fn setup_tracing() {
1370+
use tracing::Level;
1371+
use tracing_subscriber::fmt::TestWriter;
1372+
1373+
tracing_subscriber::fmt()
1374+
.with_ansi(false)
1375+
.with_max_level(Level::TRACE)
1376+
.with_writer(TestWriter::new())
1377+
.try_init()
1378+
.ok();
1379+
}
1380+
13681381
#[derive(Debug)]
13691382
struct TestBackend {
13701383
project_dir: TempDir,

0 commit comments

Comments
 (0)