[AMBER] [PATCH 6/8] AmberTools: Tests should fail when they fail

From: Reinis Danne <gam4rei.gmail.com>
Date: Tue, 23 Oct 2012 01:14:59 +0300

From: Reinis Danne <rei4dan.gmail.com>

Tests should really be deterministic and if any of them are failing then
there is no point to continue before fixing the issue at fault.

Also, was there any reason to force running tests in extra subprocess,
by enclosing recepies in parentheses? Make would spawn new processes
anyway (tough it might take shortcuts in practice, I do not see it).
---
 AmberTools/test/test_at_serial.sh | 6 ++++++
 Makefile                          | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/AmberTools/test/test_at_serial.sh b/AmberTools/test/test_at_serial.sh
index 15bb590..8fa52e3 100755
--- a/AmberTools/test/test_at_serial.sh
+++ b/AmberTools/test/test_at_serial.sh
.@ -39,3 +39,9 @@ fi
 
 # save summary for later reporting:
 tail -5 ${logfile} > ${logdir}/at_summary
+
+if [ "${questionable_count}" -ne 0 -o "${error_count}" -ne 0 ]
+then
+  # Tests failed
+  exit 1
+fi
diff --git a/Makefile b/Makefile
index 54ddfcb..643ba15 100644
--- a/Makefile
+++ b/Makefile
.@ -30,7 +30,7 @@ clean.test:
 test::  test.$(INSTALLTYPE)
 
 test.serial:
-	-(cd AmberTools/test && $(MAKE) test)
+	(cd AmberTools/test && $(MAKE) test)
 	-.(if [ -n "$(BUILDAMBER)" ] ; then \
 	    cd test && $(MAKE) test; \
 	    echo "" ; \
-- 
1.7.12.4
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Oct 22 2012 - 15:30:09 PDT
Custom Search