forked from mom-ocean/MOM6
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Run test (and test.summary) locally
The test.summary rule was causing errors in our Gitlab testing due to multiple runs (concurrent or otherwise) in the same workspace directory. This patch removes the WORKSPACE directory variable, and each .testing run happens in its own directory. Other minor changes: - The script to generate the summary was moved out of the Makefile and into a separate script. - Unrelated to these changes, error output was extended from 20 to 40 lines, to provide more readable backtrace output.
- Loading branch information
1 parent
1bb8852
commit d342b29
Showing
3 changed files
with
55 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
RESULTS=${1:-${PWD}/results} | ||
|
||
GREEN="\033[0;32m" | ||
RESET="\033[0m" | ||
PASS="${GREEN}PASS${RESET}" | ||
|
||
if [ -d ${RESULTS} ]; then | ||
if ls ${RESULTS}/*/std.*.err &> /dev/null; then | ||
echo "The following tests failed to complete:" | ||
ls ${RESULTS}/*/std.*.out \ | ||
| awk '{ \ | ||
split($$0,a,"/"); \ | ||
split(a[length(a)],t,"."); \ | ||
v=t[2]; \ | ||
if(length(t)>4) v=v"."t[4]; print a[length(a)-1],":",v}' | ||
fi | ||
|
||
if ls ${RESULTS}/*/ocean.stats.*.diff &> /dev/null; then | ||
echo "The following tests report solution regressions:" | ||
ls ${RESULTS}/*/ocean.stats.*.diff \ | ||
| awk '{ \ | ||
split($$0,a,"/"); \ | ||
split(a[length(a)],t,"."); \ | ||
v=t[3]; \ | ||
if(length(t)>4) v=v"."t[4]; print a[length(a)-1],":",v}' | ||
fi | ||
|
||
if ls ${RESULTS}/*/chksum_diag.*.diff &> /dev/null; then | ||
echo "The following tests report diagnostic regressions:" | ||
ls ${RESULTS}/*/chksum_diag.*.diff \ | ||
| awk '{ \ | ||
split($$0,a,"/"); \ | ||
split(a[length(a)],t,"."); \ | ||
v=t[2]; \ | ||
if(length(t)>4) v=v"."t[4]; print a[length(a)-1],":",v}' | ||
fi | ||
|
||
exit 1 | ||
else | ||
printf "${PASS}: All tests passed!\n" | ||
fi |