]>
git.saurik.com Git - apt.git/blob - test/integration/run-tests
6 DIR
=$(readlink -f $(dirname $0))
7 if [ "$1" = "-q" ]; then
9 elif [ "$1" = "-v" ]; then
13 if expr match
"$(readlink -f /proc/$$/fd/1)" '/dev/pts/[0-9]\+' > /dev
/null
; then
17 elif [ -z "${MSGLEVEL}" ]; then
21 if [ -z "$MSGLEVEL" ]; then
25 for testcase
in $(run-parts --list $DIR | grep '/test-'); do
26 if [ "$MSGLEVEL" -le 2 ]; then
27 echo -n "${CTEST}Testcase ${CHIGH}$(basename ${testcase})${CRESET}: "
29 echo "${CTEST}Run Testcase ${CHIGH}$(basename ${testcase})${CRESET}"
31 if ! ${testcase}; then
33 FAILED_TESTS
="$FAILED_TESTS $(basename $testcase)"
34 echo "$(basename $testcase) ... FAIL"
36 if [ "$MSGLEVEL" -le 2 ]; then
41 echo "failures: $FAIL"
42 if [ -n "$FAILED_TESTS" ]; then
43 echo "Failed tests: $FAILED_TESTS";
45 # ensure we don't overflow
46 exit $((FAIL <= 255 ? FAIL : 255))