mirror of https://github.com/hashicorp/consul
Backport of ci: fix runner calculation to exclude the top level directory as part of the calculation into release/1.15.x (#17111)
* backport of commitpull/17117/head^207d9aeb851
* backport of commit0c0a33928a
* 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> --------- Co-authored-by: John Murret <john.murret@hashicorp.com> 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>
parent
a10f09ccd1
commit
acfd7d74a8
|
@ -159,10 +159,11 @@ jobs:
|
||||||
JQ_SLICER: '[ inputs ] | [_nwise(length / $runnercount | floor)]'
|
JQ_SLICER: '[ inputs ] | [_nwise(length / $runnercount | floor)]'
|
||||||
run: |
|
run: |
|
||||||
NUM_RUNNERS=$TOTAL_RUNNERS
|
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
|
if [ "$NUM_DIRS" -lt "$NUM_RUNNERS" ]; then
|
||||||
echo "TOTAL_RUNNERS is larger than the number of tests/packages to split."
|
echo "TOTAL_RUNNERS is larger than the number of tests/packages to split."
|
||||||
NUM_RUNNERS=$NUM_DIRS
|
NUM_RUNNERS=$((NUM_DIRS-1))
|
||||||
fi
|
fi
|
||||||
# fix issue where test splitting calculation generates 1 more split than TOTAL_RUNNERS.
|
# fix issue where test splitting calculation generates 1 more split than TOTAL_RUNNERS.
|
||||||
NUM_RUNNERS=$((NUM_RUNNERS-1))
|
NUM_RUNNERS=$((NUM_RUNNERS-1))
|
||||||
|
@ -274,10 +275,11 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cd ./test/integration/consul-container
|
cd ./test/integration/consul-container
|
||||||
NUM_RUNNERS=$TOTAL_RUNNERS
|
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
|
if [ "$NUM_DIRS" -lt "$NUM_RUNNERS" ]; then
|
||||||
echo "TOTAL_RUNNERS is larger than the number of tests/packages to split."
|
echo "TOTAL_RUNNERS is larger than the number of tests/packages to split."
|
||||||
NUM_RUNNERS=$NUM_DIRS
|
NUM_RUNNERS=$((NUM_DIRS-1))
|
||||||
fi
|
fi
|
||||||
# fix issue where test splitting calculation generates 1 more split than TOTAL_RUNNERS.
|
# fix issue where test splitting calculation generates 1 more split than TOTAL_RUNNERS.
|
||||||
NUM_RUNNERS=$((NUM_RUNNERS-1))
|
NUM_RUNNERS=$((NUM_RUNNERS-1))
|
||||||
|
@ -381,9 +383,10 @@ jobs:
|
||||||
cd ./test/integration/consul-container/test/upgrade
|
cd ./test/integration/consul-container/test/upgrade
|
||||||
NUM_RUNNERS=$TOTAL_RUNNERS
|
NUM_RUNNERS=$TOTAL_RUNNERS
|
||||||
NUM_DIRS=$(go test ./... -list=. -json | jq -r '.Output | select (. !=null) | select(. | startswith("Test")) | gsub("[\\n\\t]"; "")' | wc -l)
|
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
|
if [ "$NUM_DIRS" -lt "$NUM_RUNNERS" ]; then
|
||||||
echo "TOTAL_RUNNERS is larger than the number of tests/packages to split."
|
echo "TOTAL_RUNNERS is larger than the number of tests/packages to split."
|
||||||
NUM_RUNNERS=$NUM_DIRS
|
NUM_RUNNERS=$((NUM_DIRS-1))
|
||||||
fi
|
fi
|
||||||
# fix issue where test splitting calculation generates 1 more split than TOTAL_RUNNERS.
|
# fix issue where test splitting calculation generates 1 more split than TOTAL_RUNNERS.
|
||||||
NUM_RUNNERS=$((NUM_RUNNERS-1))
|
NUM_RUNNERS=$((NUM_RUNNERS-1))
|
||||||
|
|
Loading…
Reference in New Issue