mirror of https://github.com/citusdata/citus.git
Provide a workaround for test splitting in arbitrary configs tests.
parent
f5b7d5b76f
commit
2563376019
|
@ -231,11 +231,19 @@ jobs:
|
||||||
- uses: "./.github/actions/setup_extension"
|
- uses: "./.github/actions/setup_extension"
|
||||||
- name: Test arbitrary configs
|
- name: Test arbitrary configs
|
||||||
run: |-
|
run: |-
|
||||||
TESTS=$(src/test/regress/citus_tests/print_test_names.py)
|
# we use parallel jobs to split the tests into 6 parts and run them in parallel
|
||||||
# Our test suite expects comma separated values
|
# the script below extracts the tests for the current job
|
||||||
TESTS=$(echo $TESTS | tr ' ' ',')
|
N=6 # Total number of jobs (see matrix.parallel)
|
||||||
# TESTS will contain subset of configs that will be run on a container and we use multiple containers
|
X=${{ matrix.parallel }} # Current job number
|
||||||
# to run the test suite
|
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 \
|
gosu circleci \
|
||||||
make -C src/test/regress \
|
make -C src/test/regress \
|
||||||
check-arbitrary-configs parallel=4 CONFIGS=$TESTS
|
check-arbitrary-configs parallel=4 CONFIGS=$TESTS
|
||||||
|
|
Loading…
Reference in New Issue