Skip to content

Commit

Permalink
set DEFMT_LOG in test-snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
japaric committed Sep 30, 2021
1 parent 12f7fae commit f73b593
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,16 @@ fn test_single_snapshot(
args.extend_from_slice(&["--features", features]);
}

let defmt_log = if release_mode { "info" } else { "trace" };

const CWD: &str = "firmware/qemu";
let actual = run_capturing_stdout(Command::new("cargo").args(&args).current_dir(CWD))
.with_context(|| display_name.clone())?;
let actual = run_capturing_stdout(
Command::new("cargo")
.args(&args)
.env("DEFMT_LOG", defmt_log)
.current_dir(CWD),
)
.with_context(|| display_name.clone())?;

if overwrite {
overwrite_expected_output(name, release_mode, actual.as_bytes())?;
Expand Down

0 comments on commit f73b593

Please sign in to comment.