Skip to content

Commit 45f9443

Browse files
Alex Eaglealexeagle
authored andcommitted
fix(builtin): scrub node-patches VERBOSE_LOGS when asserting on stderr
In the ubuntu1804_debug job on circleci we run with --define=VERBOSE_LOGS=1 but it produces extra stuff in stderr
1 parent 3f182f0 commit 45f9443

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

internal/node/test/BUILD.bazel

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,20 @@ nodejs_binary(
283283
entry_point = "terser_diagnostics_stats.js",
284284
)
285285

286+
# When we build with --define=VERBOSE_LOGS=1 there is some extra stuff printed to stderr
287+
# We don't care to assert about that, and it has machine-local paths so we can't assert
288+
# on the exact content either.
289+
genrule(
290+
name = "scrub_verbose_logs_stderr",
291+
srcs = [":diagnostics.out"],
292+
outs = [":diagnostics.scrubbed.out"],
293+
cmd = "grep -v 'bazel node patches enabled' $< > $@",
294+
)
295+
286296
generated_file_test(
287297
name = "stderr_output_test",
288298
src = "stderr_output_test.golden",
289-
generated = ":diagnostics.out",
299+
generated = ":diagnostics.scrubbed.out",
290300
)
291301

292302
nodejs_binary(

0 commit comments

Comments
 (0)