From 2877482e40c8ce776412404c5d9de2c1463809b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hynek=20Mlna=C5=99=C3=ADk?= Date: Wed, 19 Jan 2022 22:21:57 +0100 Subject: [PATCH] Limit time for running model tests Workaround for #9648 --- testsuite/model/test-all-profiles.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/testsuite/model/test-all-profiles.sh b/testsuite/model/test-all-profiles.sh index 532183816a..0e2a2536a4 100755 --- a/testsuite/model/test-all-profiles.sh +++ b/testsuite/model/test-all-profiles.sh @@ -15,9 +15,10 @@ for I in `perl -ne 'print "$1\n" if (m,([^<]+),)' 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