From 76142f3a804a410579695c44b87ef3dcb0b6f3f3 Mon Sep 17 00:00:00 2001 From: Samuel Breese Date: Thu, 5 Dec 2019 20:25:33 -0500 Subject: [PATCH] Print a brief summary of test results on completion in runtests.sh --- intTests/runtests.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/intTests/runtests.sh b/intTests/runtests.sh index 1f7a37945f..82e5736a45 100755 --- a/intTests/runtests.sh +++ b/intTests/runtests.sh @@ -87,6 +87,7 @@ rm -f logs/* NUM_TESTS=0 FAILED_TESTS=0 +FAILED_TEST_DETAILS="failed:" export TIMEFORMAT="%R" TOTAL_TIME=0 @@ -122,6 +123,7 @@ for i in $TESTS; do echo "$i: FAIL (${TEST_TIME}s${TIMED_OUT})" if [ ! -z "$LOUD" ]; then cat logs/$i.log; fi FAILED_TESTS=$(( $FAILED_TESTS + 1 )) + FAILED_TEST_DETAILS+=" $i" echo " > ${XML_TEMP} sed -e 's/]]>/] ]>/' logs/$i.log >> ${XML_TEMP} echo "]]>" >> ${XML_TEMP} @@ -136,4 +138,10 @@ echo " " >> $XML_FILE echo "" >> $XML_FILE rm $XML_TEMP -echo "tests completed" +PASSED_TESTS=$(expr $NUM_TESTS - $FAILED_TESTS) +echo "tests passed: ${PASSED_TESTS} / ${NUM_TESTS}" +if [ "${FAILED_TESTS}" == 0 ]; then + echo "all tests passed" +else + echo "${FAILED_TEST_DETAILS}" +fi