diff --git a/tests/run_cpu_tests.sh b/tests/run_cpu_tests.sh index 35a9743a712e..6cebfee1a9ea 100644 --- a/tests/run_cpu_tests.sh +++ b/tests/run_cpu_tests.sh @@ -3,9 +3,9 @@ set -xeu if [ "${SKIP_DISTRIB_TESTS:-0}" -eq "1" ]; then - skip_distrib_opt=(-m "not distributed and not tpu and not multinode_distributed") + skip_distrib_opt="not distributed and not tpu and not multinode_distributed" else - skip_distrib_opt=() + skip_distrib_opt="" fi MATCH_TESTS_EXPRESSION=${1:-""} @@ -15,7 +15,7 @@ EXIT_CODE_ALL_TESTS_DESELECTED=5 CACHE_DIR=.cpu-not-distrib echo [pytest] > pytest.ini ; echo "cache_dir=${CACHE_DIR}" >> pytest.ini -PYTEST_ARGS="--tx 4*popen//python=python --cov ignite --cov-report term-missing --cov-report xml -vvv tests ${skip_distrib_opt[@]} ${MATCH_TESTS_EXPRESSION}" +PYTEST_ARGS="--tx 4*popen//python=python --cov ignite --cov-report term-missing --cov-report xml -vvv tests -m '${skip_distrib_opt}' -k '${MATCH_TESTS_EXPRESSION}'" if [ "${USE_LAST_FAILED:-0}" -eq "1" ] && [ -d "${CACHE_DIR}" ]; then PYTEST_ARGS="--last-failed --last-failed-no-failures none ${PYTEST_ARGS}" fi @@ -29,7 +29,7 @@ fi export WORLD_SIZE=2 CACHE_DIR=.cpu-distrib echo [pytest] > pytest.ini ; echo "cache_dir=${CACHE_DIR}" >> pytest.ini -PYTEST_ARGS="--cov ignite --cov-append --cov-report term-missing --cov-report xml --dist=each --tx ${WORLD_SIZE}*popen//python=python tests -m distributed -vvv ${MATCH_TESTS_EXPRESSION}" +PYTEST_ARGS="--cov ignite --cov-append --cov-report term-missing --cov-report xml --dist=each --tx ${WORLD_SIZE}*popen//python=python tests -m distributed -vvv -k '${MATCH_TESTS_EXPRESSION}'" if [ "${USE_LAST_FAILED:-0}" -eq "1" ] && [ -d "${CACHE_DIR}" ]; then PYTEST_ARGS="--last-failed --last-failed-no-failures none ${PYTEST_ARGS}" fi