ci: fix runner calculation to exclude the top level directory as part of the calculation (#17090)
* fix runner calculation to exclude the top level directory as part of the calculation * fix the logic for generating the directories/functions * De-scope tenenacy requirements to OSS only for now. (#17087) Partition and namespace must be "default" Peername must be "local" * Fix virtual services being included in intention topology as downstreams. (#17099) * Merge pull request #5200 from hashicorp/NET-3758 (#17102) * Merge pull request #5200 from hashicorp/NET-3758 NET-3758: connect: update supported envoy versions to 1.26.0 * lint * CI: remove uneeded AWS creds from test-integrations (#17104) * Update test-integrations.yml * removing permission lies now that vault is not used in this job. --------- Co-authored-by: John Murret <john.murret@hashicorp.com> * update based on feedback --------- Co-authored-by: Semir Patel <semir.patel@hashicorp.com> Co-authored-by: Derek Menteer <105233703+hashi-derek@users.noreply.github.com> Co-authored-by: Anita Akaeze <anita.akaeze@hashicorp.com> Co-authored-by: Dan Bond <danbond@protonmail.com>
This commit is contained in:
parent
c5b7164b16
commit
eee48de998
|
@ -159,10 +159,11 @@ jobs:
|
|||
JQ_SLICER: '[ inputs ] | [_nwise(length / $runnercount | floor)]'
|
||||
run: |
|
||||
NUM_RUNNERS=$TOTAL_RUNNERS
|
||||
NUM_DIRS=$(find ./test/integration/connect/envoy -maxdepth 1 -type d | wc -l)
|
||||
NUM_DIRS=$(find ./test/integration/connect/envoy -mindepth 1 -maxdepth 1 -type d | wc -l)
|
||||
|
||||
if [ "$NUM_DIRS" -lt "$NUM_RUNNERS" ]; then
|
||||
echo "TOTAL_RUNNERS is larger than the number of tests/packages to split."
|
||||
NUM_RUNNERS=$NUM_DIRS
|
||||
NUM_RUNNERS=$((NUM_DIRS-1))
|
||||
fi
|
||||
# fix issue where test splitting calculation generates 1 more split than TOTAL_RUNNERS.
|
||||
NUM_RUNNERS=$((NUM_RUNNERS-1))
|
||||
|
@ -252,10 +253,11 @@ jobs:
|
|||
run: |
|
||||
cd ./test/integration/consul-container
|
||||
NUM_RUNNERS=$TOTAL_RUNNERS
|
||||
NUM_DIRS=$(find ./test -maxdepth 2 -type d | wc -l)
|
||||
NUM_DIRS=$(find ./test -mindepth 1 -maxdepth 2 -type d | wc -l)
|
||||
|
||||
if [ "$NUM_DIRS" -lt "$NUM_RUNNERS" ]; then
|
||||
echo "TOTAL_RUNNERS is larger than the number of tests/packages to split."
|
||||
NUM_RUNNERS=$NUM_DIRS
|
||||
NUM_RUNNERS=$((NUM_DIRS-1))
|
||||
fi
|
||||
# fix issue where test splitting calculation generates 1 more split than TOTAL_RUNNERS.
|
||||
NUM_RUNNERS=$((NUM_RUNNERS-1))
|
||||
|
@ -358,9 +360,10 @@ jobs:
|
|||
cd ./test/integration/consul-container/test/upgrade
|
||||
NUM_RUNNERS=$TOTAL_RUNNERS
|
||||
NUM_DIRS=$(go test ./... -list=. -json | jq -r '.Output | select (. !=null) | select(. | startswith("Test")) | gsub("[\\n\\t]"; "")' | wc -l)
|
||||
|
||||
if [ "$NUM_DIRS" -lt "$NUM_RUNNERS" ]; then
|
||||
echo "TOTAL_RUNNERS is larger than the number of tests/packages to split."
|
||||
NUM_RUNNERS=$NUM_DIRS
|
||||
NUM_RUNNERS=$((NUM_DIRS-1))
|
||||
fi
|
||||
# fix issue where test splitting calculation generates 1 more split than TOTAL_RUNNERS.
|
||||
NUM_RUNNERS=$((NUM_RUNNERS-1))
|
||||
|
|
Loading…
Reference in New Issue