When I split tests all the tests 532 of them go to one test container and the other containers don’t get anything.
Configuration:
test-parallel:
<<: *python-postgres
parallelism: 4
steps:
- checkout
- run: echo $(circleci tests glob "ff/mods/**/tests/**/*.py" "ff/**/tests.py" "ff/**/test_*.py" "ff/**/*_test.py" "ff/tests/*.py")
- run: echo $(circleci tests glob "ff/mods/**/tests/**/*.py" "ff/**/tests.py" "ff/**/test_*.py" "ff/**/*_test.py" "ff/tests/*.py" | tr ' ' '\n' | wc -l)
- run:
name: test
command: |
# get test files while ignoring __init__ files
TESTFILES=$(circleci tests glob "ff/mods/**/tests/**/*.py" "ff/**/tests.py" "ff/**/test_*.py" "ff/**/*_test.py" "ff/tests/*.py" | sed 's/\S\+__init__.py//g')
# reformat to remove duplicates, remove dups, reformat back
echo $TESTFILES | tr ' ' '\n' | sort | uniq | tr '\n' ' ' > circleci_test_files.txt
cat circleci_test_files.txt
cat circleci_test_files.txt | tr ' ' '\n' | wc -l
# split test files into seperate sets depending on parallel container
TESTFILES=$(circleci tests split circleci_test_files.txt)
# massage filepaths into format manage.py test accepts
TESTFILES=$(echo $TESTFILES | tr "/" "." | sed 's/.py//g')
echo $TESTFILES
echo $TESTFILES | tr ' ' '\n' | wc -l
ff/core/permissions/tests.py ... output truncated ... ff/tests/test_sanitize.py ff/tests/test_serializers.py ff/tests/test_user.py 532
ff.core.permissions.tests ...output truncated... ff.tests.test_user
532
CircleCI received exit code 0
ff/core/permissions/tests.py ... output truncated ... ff/tests/test_serializers.py ff/tests/test_user.py 532
1
CircleCI received exit code 0