From bcee1e10143baeb7acb8c959996496a1bce0cbbd Mon Sep 17 00:00:00 2001 From: Marcel Bargull Date: Tue, 22 Nov 2022 11:46:57 +0100 Subject: [PATCH] Compose runtests cmd more uniformly across systems --- recipe/run_test.sh | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/recipe/run_test.sh b/recipe/run_test.sh index f799d37..8f5a5b2 100644 --- a/recipe/run_test.sh +++ b/recipe/run_test.sh @@ -6,12 +6,18 @@ export NUMBA_DEVELOPER_MODE=1 export NUMBA_DISABLE_ERROR_MESSAGE_HIGHLIGHTING=1 export PYTHONFAULTHANDLER=1 +runtests=( + python -m numba.runtests + -b + --exclude-tags='long_running' +) + unamestr=`uname` if [[ "$unamestr" == 'Linux' ]]; then - SEGVCATCH=catchsegv + runtests=(catchsegv "${runtests[@]}") export CC="${CC} -pthread" elif [[ "$unamestr" == 'Darwin' ]]; then - SEGVCATCH="" + : else echo Error fi @@ -20,11 +26,11 @@ fi # occur on high core count systems archstr=`uname -m` if [[ "$archstr" == 'ppc64le' ]]; then - TEST_NPROCS=1 + runtests+=(-m 1) elif [[ "$archstr" == 'aarch64' ]]; then - TEST_NPROCS=4 + runtests+=(-m 4) else - TEST_NPROCS=${CPU_COUNT} + runtests+=(-m ${CPU_COUNT}) fi # Disable NumPy dispatching to AVX512_SKX feature extensions if the chip is @@ -52,13 +58,15 @@ numba -s python -m numba.tests.test_runtests if [[ "$archstr" == 'aarch64' ]] || [[ "$archstr" == "ppc64le" ]]; then - echo 'Running only a slice of tests' - $SEGVCATCH python -m numba.runtests -b -j --random='0.15' --exclude-tags='long_running' -m $TEST_NPROCS -- numba.tests + echo 'Running only a slice of tests' + runtests+=(-j --random='0.15' -- numba.tests) # Else run the whole test suite else - echo 'Running all the tests except long_running' - echo "Running: $SEGVCATCH python -m numba.runtests -b -m $TEST_NPROCS -- $TESTS_TO_RUN" -$SEGVCATCH python -m numba.runtests -b --exclude-tags='long_running' -m $TEST_NPROCS -- $TESTS_TO_RUN + echo 'Running all the tests except long_running' + runtests+=(--) fi +echo "Running: ${runtests[*]}" +"${runtests[@]}" + pip check