Skip to content

Commit

Permalink
Don't accidentally ignore all output in `tests/run-make/coverage-repo…
Browse files Browse the repository at this point in the history
…rts` diffs

Because the literal pipe `|` character was not escaped, these regexes ended up
accidentally ignoring every line in the coverage report output, so the tests
would not fail even if the output was wrong.
  • Loading branch information
Zalathar committed Apr 28, 2023
1 parent 2fce229 commit a6fa0e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/run-make/coverage-reports/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ else
# files are redundant, so there is no need to generate `expected_*.json` files or
# compare actual JSON results.)

$(DIFF) --ignore-matching-lines='^ | .*::<.*>.*:$$' --ignore-matching-lines='^ | <.*>::.*:$$' \
$(DIFF) --ignore-matching-lines='^ \| .*::<.*>.*:$$' --ignore-matching-lines='^ \| <.*>::.*:$$' \
expected_show_coverage.$@.txt "$(TMPDIR)"/actual_show_coverage.$@.txt || \
( grep -q '^\/\/ ignore-llvm-cov-show-diffs' $(SOURCEDIR)/$@.rs && \
>&2 echo 'diff failed, but suppressed with `// ignore-llvm-cov-show-diffs` in $(SOURCEDIR)/$@.rs' \
Expand Down

0 comments on commit a6fa0e0

Please sign in to comment.