Skip to content

Commit

Permalink
fix(builtin): scrub node-patches VERBOSE_LOGS when asserting on stderr
Browse files Browse the repository at this point in the history
In the ubuntu1804_debug job on circleci we run with --define=VERBOSE_LOGS=1 but it produces extra stuff in stderr
  • Loading branch information
Alex Eagle authored and alexeagle committed Jun 16, 2020
1 parent 3f182f0 commit 45f9443
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion internal/node/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,20 @@ nodejs_binary(
entry_point = "terser_diagnostics_stats.js",
)

# When we build with --define=VERBOSE_LOGS=1 there is some extra stuff printed to stderr
# We don't care to assert about that, and it has machine-local paths so we can't assert
# on the exact content either.
genrule(
name = "scrub_verbose_logs_stderr",
srcs = [":diagnostics.out"],
outs = [":diagnostics.scrubbed.out"],
cmd = "grep -v 'bazel node patches enabled' $< > $@",
)

generated_file_test(
name = "stderr_output_test",
src = "stderr_output_test.golden",
generated = ":diagnostics.out",
generated = ":diagnostics.scrubbed.out",
)

nodejs_binary(
Expand Down

0 comments on commit 45f9443

Please sign in to comment.