Skip to content

Commit

Permalink
chore: If 'PAVEX_LOG' is set, show the code generation logs coming fr…
Browse files Browse the repository at this point in the history
…om test execution to ease debugging
  • Loading branch information
LukeMathWalker committed Oct 24, 2024
1 parent 4e0f830 commit 6804790
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libs/pavex_test_runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,14 @@ fn code_generation_test(
}
};

if std::env::var("PAVEX_LOG").as_deref() == Ok("true") {
eprintln!(
"Code generation stderr:\n{}Code generation stdout:\n{}",
textwrap::indent(&codegen_output.stderr, " "),
textwrap::indent(&codegen_output.stdout, " "),
)
}

let expectations_directory = test.expectations_directory();
let outcome = if !output.status.success() {
match test.configuration.expectations.codegen {
Expand Down

0 comments on commit 6804790

Please sign in to comment.