1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

add the capability to run several tests at once

This commit is contained in:
Sylvestre Ledru 2022-09-16 10:26:29 +02:00
parent 902ff1694d
commit acef46b629
3 changed files with 17 additions and 5 deletions

View file

@ -31,16 +31,26 @@ cd "${path_GNU}" && echo "[ pwd:'${PWD}' ]"
export RUST_BACKTRACE=1
if test -n "$1"; then
# if set, run only the test passed
export RUN_TEST="TESTS=$1"
if test $# -ge 1; then
# if set, run only the tests passed
SPECIFIC_TESTS=""
for t in "$@"; do
SPECIFIC_TESTS="$SPECIFIC_TESTS $t"
done
# trim it
SPECIFIC_TESTS=$(echo $SPECIFIC_TESTS| xargs)
echo "Running specific tests: $SPECIFIC_TESTS"
fi
# * timeout used to kill occasionally errant/"stuck" processes (note: 'release' testing takes ~1 hour; 'debug' testing takes ~2.5 hours)
# * `gl_public_submodule_commit=` disables testing for use of a "public" gnulib commit (which will fail when using shallow gnulib checkouts)
# * `srcdir=..` specifies the GNU source directory for tests (fixing failing/confused 'tests/factor/tNN.sh' tests and causing no harm to other tests)
#shellcheck disable=SC2086
timeout -sKILL 4h make -j "$(nproc)" check ${RUN_TEST} SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no gl_public_submodule_commit="" srcdir="${path_GNU}" || : # Kill after 4 hours in case something gets stuck in make
if test $# -ge 1; then
timeout -sKILL 4h make -j "$(nproc)" check TESTS="$SPECIFIC_TESTS" SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no gl_public_submodule_commit="" srcdir="${path_GNU}" || : # Kill after 4 hours in case something gets stuck in make
else
timeout -sKILL 4h make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no gl_public_submodule_commit="" srcdir="${path_GNU}" || : # Kill after 4 hours in case something gets stuck in make
fi
if test -z "$1" && test -n "$CI"; then
sudo make -j "$(nproc)" check-root SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no gl_public_submodule_commit="" srcdir="${path_GNU}" TEST_SUITE_LOG="tests/test-suite-root.log" || :