From dae47d04d01e6f2d20f992842af416f3fc7ad688 Mon Sep 17 00:00:00 2001 From: Giovanni Bussi <giovanni.bussi@gmail.com> Date: Mon, 16 Oct 2017 23:54:01 +0200 Subject: [PATCH] Better report regtest failures Report a failure in the following two cases: - unknown test type - test program exiting with non-zero code --- regtest/scripts/run | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/regtest/scripts/run b/regtest/scripts/run index 2c60d8d1f..66107ebb1 100755 --- a/regtest/scripts/run +++ b/regtest/scripts/run @@ -127,8 +127,12 @@ case "$type" in (plumed) $mpi $valgrind $plumed $arg > out 2> err ;; -(*) echo "unknown test type" ; exit 1 ;; +(*) echo "FAILURE: unknown test type" ; exit 1 ;; esac +exitcode="$?" +if test $exitcode -ne 0 ; then + echo "FAILURE: exit code $exitcode" +fi if type -t plumed_regtest_after 1>/dev/null ; then plumed_regtest_after -- GitLab