]>
git.saurik.com Git - apt.git/blob - test/integration/run-tests
9 DIR
=$(readlink -f $(dirname $0))
10 if [ "$1" = "-q" ]; then
12 elif [ "$1" = "-v" ]; then
16 if expr match
"$(readlink -f /proc/$$/fd/1)" '/dev/pts/[0-9]\+' > /dev
/null
; then
20 elif [ -z "${MSGLEVEL}" ]; then
24 if [ -z "$MSGLEVEL" ]; then
28 for testcase
in $(run-parts --list $DIR | grep '/test-'); do
29 if [ "$MSGLEVEL" -le 2 ]; then
30 echo -n "${CTEST}Testcase ${CHIGH}$(basename ${testcase})${CRESET}: "
32 echo "${CTEST}Run Testcase ${CHIGH}$(basename ${testcase})${CRESET}"
34 if ! ${testcase}; then
36 FAILED_TESTS
="$FAILED_TESTS $(basename $testcase)"
37 echo >&2 "$(basename $testcase) ... FAIL"
42 if [ "$MSGLEVEL" -le 2 ]; then
47 echo >&2 "Statistics: $ALL tests were run: $PASS successfully and $FAIL failed"
48 if [ -n "$FAILED_TESTS" ]; then
49 echo >&2 "Failed tests: $FAILED_TESTS"
51 echo >&2 'All tests seem to have been run successfully. What could possibly go wrong?'
53 # ensure we don't overflow
54 exit $((FAIL <= 255 ? FAIL : 255))