Limit time for running model tests

Workaround for #9648
This commit is contained in:
Hynek Mlnařík 2022-01-19 22:21:57 +01:00
parent 7b89d151c1
commit 2877482e40

View file

@ -15,9 +15,10 @@ for I in `perl -ne 'print "$1\n" if (m,<id>([^<]+)</id>,)' pom.xml`; do
echo "========"
echo "======== Profile $I"
echo "========"
mvn -B test "-P$I" "$@"
EXIT_CODE=$[$EXIT_CODE + $?]
mvn -B -Dsurefire.timeout=600 test "-P$I" "$@" 2>&1 | tee /tmp/surefire.out
EXIT_CODE=$[$EXIT_CODE + ${PIPESTATUS[0]}]
mv target/surefire-reports "target/surefire-reports-$I"
perl -ne "print '::error::| $I | Timed out.' . \"\n\" if (/There was a timeout in the fork/)" /tmp/surefire.out
done
## If the jacoco file is present, generate reports in each of the model projects