mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-25 23:47:53 +00:00
testsuite/Start.sh: added timeout 900 sec per test script.
This commit is contained in:
parent
a92f10b6ee
commit
edac400fdf
|
@ -4,18 +4,20 @@
|
||||||
|
|
||||||
export LANG=C
|
export LANG=C
|
||||||
SHFILE=/tmp/unittest-parallel.sh
|
SHFILE=/tmp/unittest-parallel.sh
|
||||||
|
MAX_SEC_PER_TEST=900
|
||||||
|
export TIMEOUT=$MAX_SEC_PER_TEST
|
||||||
|
|
||||||
if [ "$TRIES" = "3" ] ; then
|
if [ "$TRIES" = "3" ] ; then
|
||||||
# Try a failing test thrice
|
# Try a failing test thrice
|
||||||
echo Retrying 3 times
|
echo Retrying 3 times
|
||||||
ls -t tests-to-run/*${1}*.sh |
|
ls -t tests-to-run/*${1}*.sh |
|
||||||
perl -pe 's:(.*/(.*)).sh:bash $1.sh > actual-results/$2; diff -Naur wanted-results/$2 actual-results/$2 >/dev/null || bash $1.sh > actual-results/$2; diff -Naur wanted-results/$2 actual-results/$2 >/dev/null || bash $1.sh > actual-results/$2; diff -Naur wanted-results/$2 actual-results/$2 || touch $1.sh: ' \
|
perl -pe 's:(.*/(.*)).sh:timeout '$TIMEOUT' bash $1.sh > actual-results/$2; diff -Naur wanted-results/$2 actual-results/$2 >/dev/null || timeout '$TIMEOUT' bash $1.sh > actual-results/$2; diff -Naur wanted-results/$2 actual-results/$2 >/dev/null || timeout '$TIMEOUT' bash $1.sh > actual-results/$2; diff -Naur wanted-results/$2 actual-results/$2 || touch $1.sh: ' \
|
||||||
>$SHFILE
|
>$SHFILE
|
||||||
else
|
else
|
||||||
# Run a failing test once
|
# Run a failing test once
|
||||||
echo Not retrying
|
echo Not retrying
|
||||||
ls -t tests-to-run/*${1}*.sh |
|
ls -t tests-to-run/*${1}*.sh |
|
||||||
perl -pe 's:(.*/(.*)).sh:bash $1.sh > actual-results/$2; diff -Naur wanted-results/$2 actual-results/$2 || touch $1.sh:' \
|
perl -pe 's:(.*/(.*)).sh:timeout '$TIMEOUT' bash $1.sh > actual-results/$2; diff -Naur wanted-results/$2 actual-results/$2 || touch $1.sh:' \
|
||||||
>$SHFILE
|
>$SHFILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue