Explorar el Código

test/integration/: remove a bunch of "local" statements from the shellscript, keep tests running even on failure but log failures

Michael Vogt hace 15 años
padre
commit
adee3bae78

+ 1 - 1
test/integration/create-test-data

@@ -6,7 +6,7 @@ if [ -z "$1" -o -z "$2" ]; then
 	exit 1
 fi
 
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
 . $TESTDIR/framework
 BUILDDIRECTORY="${TESTDIR}/../../build/bin"
 

+ 8 - 1
test/integration/run-tests

@@ -1,6 +1,7 @@
 #!/bin/sh
 set -e
 
+FAIL=0
 DIR=$(readlink -f $(dirname $0))
 if [ "$1" = "-q" ]; then
 	export MSGLEVEL=2
@@ -13,8 +14,14 @@ for testcase in $(run-parts --list $DIR | grep '/test-'); do
 	else
 		echo "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m"
 	fi
-	${testcase}
+	if ! ${testcase}; then
+                 FAIL=$((FAIL+1))
+                 echo "$(basename $testcase) ... FAIL"
+        fi
 	if [ "$1" = "-q" ]; then
 		echo
 	fi
 done
+
+echo "failures: $FAIL"
+exit $FAIL

+ 1 - 1
test/integration/test-bug-254770-segfault-if-cache-not-buildable

@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e
 
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
 . $TESTDIR/framework
 setupenvironment
 configarchitecture "i386"

+ 1 - 1
test/integration/test-bug-330162-encoded-tar-header

@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e
 
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
 . $TESTDIR/framework
 setupenvironment
 configarchitecture "i386"

+ 1 - 1
test/integration/test-bug-593360-modifiers-in-names

@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e
 
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
 . $TESTDIR/framework
 setupenvironment
 configarchitecture "i386"

+ 1 - 1
test/integration/test-bug-601961-install-info

@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e
 
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
 . $TESTDIR/framework
 setupenvironment
 configarchitecture "i386"

+ 1 - 1
test/integration/test-bug-604222-new-and-autoremove

@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e
 
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
 . $TESTDIR/framework
 setupenvironment
 configarchitecture "i386"

+ 1 - 1
test/integration/test-bug-604401-files-are-directories

@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e
 
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
 . $TESTDIR/framework
 setupenvironment
 configarchitecture "i386"

+ 1 - 1
test/integration/test-bug-605394-versioned-or-groups

@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e
 
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
 . $TESTDIR/framework
 setupenvironment
 configarchitecture "i386"

+ 1 - 1
test/integration/test-bug-612557-garbage-upgrade

@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e
 
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
 . $TESTDIR/framework
 setupenvironment
 configarchitecture "i386"

+ 1 - 1
test/integration/test-release-candidate-switching

@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e
 
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
 . $TESTDIR/framework
 setupenvironment
 configarchitecture "i386"

+ 1 - 1
test/integration/test-ubuntu-bug-365611-long-package-names

@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e
 
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
 . $TESTDIR/framework
 setupenvironment
 configarchitecture "i386"