[med-svn] [praat] 03/05: d/t/run-tests: Show failed unit tests

Rafael Laboissiere rafael at debian.org
Sat Oct 7 05:39:32 UTC 2017


This is an automated email from the git hooks/post-receive script.

rafael pushed a commit to branch master
in repository praat.

commit 7b929b765044f20227880e8dc19f033bb4324f13
Author: Rafael Laboissiere <rafael at debian.org>
Date:   Fri Oct 6 13:34:47 2017 -0300

    d/t/run-tests: Show failed unit tests
---
 debian/tests/run-tests | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/debian/tests/run-tests b/debian/tests/run-tests
index 2538ab4..3f66b27 100755
--- a/debian/tests/run-tests
+++ b/debian/tests/run-tests
@@ -18,12 +18,13 @@ run() {
     ## Execute the test and increment ok counter if it succeeds
     xvfb-run -a $PRAAT --run $1		\
         && test_ok=$(($test_ok + 1))	\
-        || true
+        || failed="$failed\n    $1"
 }
 
 ### Initialize counters
 test_count=0
 test_ok=0
+failed=
 
 ### Loop over the directories in test/
 cd test
@@ -59,4 +60,7 @@ done
 echo "$test_count tests passed, $test_ok ok"
 
 ### Exit with error in case of unit test failures
-[ $test_count = $test_ok ] || exit 1
+if [ $test_count != $test_ok ] ; then
+    echo "Failed test(s):\n$failed"
+    exit 1
+fi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/praat.git



More information about the debian-med-commit mailing list