]> git.saurik.com Git - apt.git/blame_incremental - test/integration/run-tests
merged from debian-sid
[apt.git] / test / integration / run-tests
... / ...
CommitLineData
1#!/bin/sh
2set -e
3
4FAIL=0
5DIR=$(readlink -f $(dirname $0))
6if [ "$1" = "-q" ]; then
7 export MSGLEVEL=2
8elif [ "$1" = "-v" ]; then
9 export MSGLEVEL=4
10fi
11for testcase in $(run-parts --list $DIR | grep '/test-'); do
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
17 if ! ${testcase}; then
18 FAIL=$((FAIL+1))
19 echo "$(basename $testcase) ... FAIL"
20 fi
21 if [ "$1" = "-q" ]; then
22 echo
23 fi
24done
25
26echo "failures: $FAIL"
27exit $FAIL