diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh index 05e4d8fd54a..3e07f1c86d2 100755 --- a/ci/test/03_test_script.sh +++ b/ci/test/03_test_script.sh @@ -41,7 +41,10 @@ echo "=== BEGIN env ===" env echo "=== END env ===" -( +# Don't apply patches in the tidy job, because it relies on the `git diff` +# command to detect IWYU errors. It is safe to skip this patch in the tidy job +# because it doesn't run a UB detector. +if [ "$RUN_TIDY" != "true" ]; then # compact->outputs[i].file_size is uninitialized memory, so reading it is UB. # The statistic bytes_written is only used for logging, which is disabled in # CI, so as a temporary minimal fix to work around UB and CI failures, leave @@ -62,7 +65,7 @@ echo "=== END env ===" mutex_.Lock(); stats_[compact->compaction->level() + 1].Add(stats); EOF -) +fi if [ "$RUN_FUZZ_TESTS" = "true" ]; then export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_corpora/