Provide a workaround for test splitting in arbitrary configs tests.

pull/7154/head
Gokhan Gulbiz 2023-10-06 08:43:46 +03:00
parent f5b7d5b76f
commit 2563376019
No known key found for this signature in database
GPG Key ID: 608EF06B6BD1B45B
1 changed files with 13 additions and 5 deletions

View File

@ -231,11 +231,19 @@ jobs:
- uses: "./.github/actions/setup_extension"
- name: Test arbitrary configs
run: |-
TESTS=$(src/test/regress/citus_tests/print_test_names.py)
# Our test suite expects comma separated values
TESTS=$(echo $TESTS | tr ' ' ',')
# TESTS will contain subset of configs that will be run on a container and we use multiple containers
# to run the test suite
# we use parallel jobs to split the tests into 6 parts and run them in parallel
# the script below extracts the tests for the current job
N=6 # Total number of jobs (see matrix.parallel)
X=${{ matrix.parallel }} # Current job number
TESTS=$(src/test/regress/citus_tests/print_test_names.py |
tr '\n' ',' | awk -v N="$N" -v X="$X" -F, '{
split("", parts)
for (i = 1; i <= NF; i++) {
parts[i % N] = parts[i % N] $i ","
}
print substr(parts[X], 1, length(parts[X])-1)
}')
echo $TESTS
gosu circleci \
make -C src/test/regress \
check-arbitrary-configs parallel=4 CONFIGS=$TESTS