Skip to content

Commit

Permalink
Add the ability to log more verbosely via UDEPS_VERBOSE_TEST
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed Apr 28, 2023
1 parent 53f39e2 commit d219c40
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/runner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ impl Runner {

pub(crate) fn run(self) -> CargoResult<(i32, String)> {
let mut stdout = vec![];
let stderr = Shell::from_write(Box::new(vec![]));
let stderr = if std::env::var("UDEPS_VERBOSE_TEST").is_ok() {
Shell::new()
} else {
eprintln!("Please set the UDEPS_VERBOSE_TEST environment variable to enable more verbose logging");
Shell::from_write(Box::new(vec![]))
};
let mut config = cargo::Config::new(stderr, self.cwd.path().to_owned(), self.cargo_home.clone());
let code = match cargo_udeps::run(self.args.clone(), &mut config, &mut stdout) {
Ok(()) => 0,
Expand Down

0 comments on commit d219c40

Please sign in to comment.