[Crosstoolchain-logs] [device-tree-compiler] 105/198: Add option to run_tests.sh to stop immediately on a failing test

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:06:58 UTC 2016


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

zumbi pushed a commit to branch upstream/1.4.x
in repository device-tree-compiler.

commit edb10bcf1cd5be7251fc87ed5fc622f620008ceb
Author: David Gibson <david at gibson.dropbear.id.au>
Date:   Mon Dec 30 22:42:41 2013 +1100

    Add option to run_tests.sh to stop immediately on a failing test
    
    This is a debugging convenience option, which makes it much easier to find
    the failing tests and fix them one by one.
    
    Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
 tests/run_tests.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index a8905a7..97e016b 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -7,6 +7,7 @@ if [ -z "$CC" ]; then
 fi
 
 export QUIET_TEST=1
+STOP_ON_FAIL=0
 
 export VALGRIND=
 VGCODE=126
@@ -24,6 +25,9 @@ base_run_test() {
 	tot_pass=$((tot_pass + 1))
     else
 	ret="$?"
+	if [ "$STOP_ON_FAIL" -eq 1 ]; then
+	    exit 1
+	fi
 	if [ "$ret" -eq 1 ]; then
 	    tot_config=$((tot_config + 1))
 	elif [ "$ret" -eq 2 ]; then
@@ -595,7 +599,7 @@ utilfdt_tests () {
     run_test utilfdt_test
 }
 
-while getopts "vt:m" ARG ; do
+while getopts "vt:me" ARG ; do
     case $ARG in
 	"v")
 	    unset QUIET_TEST
@@ -606,6 +610,9 @@ while getopts "vt:m" ARG ; do
 	"m")
 	    VALGRIND="valgrind --tool=memcheck -q --error-exitcode=$VGCODE"
 	    ;;
+	"e")
+	    STOP_ON_FAIL=1
+	    ;;
     esac
 done
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list