From 2e8e116d4ccce7e000ab20d542b44b8d3b98ffed Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 3 Apr 2021 12:26:09 +0300 Subject: [PATCH] Filter removed/renamed tests from ci-changed-files.txt for fuzzer --- docker/test/fuzzer/run-fuzzer.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docker/test/fuzzer/run-fuzzer.sh b/docker/test/fuzzer/run-fuzzer.sh index e21f9efae6..4bd3fa717a 100755 --- a/docker/test/fuzzer/run-fuzzer.sh +++ b/docker/test/fuzzer/run-fuzzer.sh @@ -69,11 +69,25 @@ function watchdog killall -9 clickhouse-client ||: } +function filter_exists +{ + local path + for path in "$@"; do + if [ -e "$path" ]; then + echo "$path" + else + echo "'$path' does not exists" >&2 + fi + done +} + function fuzz { # Obtain the list of newly added tests. They will be fuzzed in more extreme way than other tests. # Don't overwrite the NEW_TESTS_OPT so that it can be set from the environment. NEW_TESTS="$(grep -P 'tests/queries/0_stateless/.*\.sql' ci-changed-files.txt | sed -r -e 's!^!ch/!' | sort -R)" + # ci-changed-files.txt contains also files that has been deleted/renamed, filter them out. + NEW_TESTS="$(filter_exists $NEW_TESTS)" if [[ -n "$NEW_TESTS" ]] then NEW_TESTS_OPT="${NEW_TESTS_OPT:---interleave-queries-file ${NEW_TESTS}}" -- GitLab