]> git.saurik.com Git - apt.git/blame - test/integration/run-tests
test/integration/: remove a bunch of "local" statements from the shellscript, keep...
[apt.git] / test / integration / run-tests
CommitLineData
8d876415
DK
1#!/bin/sh
2set -e
3
adee3bae 4FAIL=0
9962ae93 5DIR=$(readlink -f $(dirname $0))
39cc8228
DK
6if [ "$1" = "-q" ]; then
7 export MSGLEVEL=2
8elif [ "$1" = "-v" ]; then
18331adf 9 export MSGLEVEL=4
39cc8228 10fi
8d876415 11for testcase in $(run-parts --list $DIR | grep '/test-'); do
39cc8228
DK
12 if [ "$1" = "-q" ]; then
13 echo -n "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m"
14 else
15 echo "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m"
16 fi
adee3bae
MV
17 if ! ${testcase}; then
18 FAIL=$((FAIL+1))
19 echo "$(basename $testcase) ... FAIL"
20 fi
39cc8228
DK
21 if [ "$1" = "-q" ]; then
22 echo
23 fi
8d876415 24done
adee3bae
MV
25
26echo "failures: $FAIL"
27exit $FAIL