From 8caa62ede0b4f992bb5d7c7d11825f81ea0712f3 Mon Sep 17 00:00:00 2001 From: Mariell Hoversholm Date: Wed, 21 May 2025 14:25:48 +0200 Subject: [PATCH] CI: Select all packages in sharded tests (#105725) --- scripts/ci/backend-tests/pkgs-with-tests-named.sh | 2 +- scripts/ci/backend-tests/shard.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci/backend-tests/pkgs-with-tests-named.sh b/scripts/ci/backend-tests/pkgs-with-tests-named.sh index ea8cf286880..82a677cab24 100755 --- a/scripts/ci/backend-tests/pkgs-with-tests-named.sh +++ b/scripts/ci/backend-tests/pkgs-with-tests-named.sh @@ -44,7 +44,7 @@ done shift $((OPTIND - 1)) if [[ ${#dirs[@]} -eq 0 ]]; then - dirs+=("./...") + readarray -t dirs <<< "$(find . -type f -name 'go.mod' -exec dirname '{}' ';' | awk '{ print $1 "/..."; }')" fi if [ -z "$beginningWith" ]; then for pkg in "${dirs[@]}"; do diff --git a/scripts/ci/backend-tests/shard.sh b/scripts/ci/backend-tests/shard.sh index 6e2702c610a..cce9d944b2e 100755 --- a/scripts/ci/backend-tests/shard.sh +++ b/scripts/ci/backend-tests/shard.sh @@ -100,7 +100,7 @@ if [[ $n -gt $m ]]; then exit 1 fi if [[ ${#dirs[@]} -eq 0 ]]; then - dirs+=("./...") + readarray -t dirs <<< "$(find . -type f -name 'go.mod' -exec dirname '{}' ';' | awk '{ print $1 "/..."; }')" fi # If dirs is just ("-"), read from stdin instead. if [[ ${#dirs[@]} -eq 1 && "${dirs[0]}" == "-" ]]; then