~ubuntu-branches/ubuntu/hardy/debian-installer-utils/hardy-updates

« back to all changes in this revision

Viewing changes to testsuite/runtests

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2007-04-25 12:48:57 UTC
  • Revision ID: james.westby@ubuntu.com-20070425124857-1rczukiuehms3o6g
Tags: 1.46ubuntu1
* Resynchronise with Debian. Remaining changes:
  - user-params: Don't propagate ks=* or vga=* to installed system.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
set -e
 
3
 
 
4
TESTS=0
 
5
SUCCESSES=0
 
6
 
 
7
[ "$TEST_VERBOSE" ] || export TEST_VERBOSE=1
 
8
 
 
9
cd tests
 
10
 
 
11
if [ $TEST_VERBOSE -eq 1 ]; then
 
12
        echo "Running testsuite:"
 
13
fi
 
14
for test in *; do
 
15
        if [ ! -x $test ]; then
 
16
                continue
 
17
        fi
 
18
 
 
19
        if [ $TEST_VERBOSE -eq 1 ]; then
 
20
                echo -n "- $test... "
 
21
        elif [ $TEST_VERBOSE -ge 1 ]; then
 
22
                echo Running tests for $test...
 
23
        fi
 
24
        TESTS=$(($TESTS + 1))
 
25
        if eval "./$test"; then
 
26
                if [ $TEST_VERBOSE -eq 1 ]; then
 
27
                        echo "OK."
 
28
                fi
 
29
                SUCCESSES=$(($SUCCESSES + 1))
 
30
        else
 
31
                if [ $TEST_VERBOSE -eq 1 ];then
 
32
                        echo "FAILED."
 
33
                fi
 
34
        fi
 
35
        if [ $TEST_VERBOSE -ge 1 ]; then
 
36
                echo
 
37
        fi
 
38
done
 
39
 
 
40
if [ $TEST_VERBOSE -ge 1 ];then
 
41
        echo "Overall result: $SUCCESSES out of $TESTS tests were successful"
 
42
fi
 
43
if [ $SUCCESSES -ne $TESTS ]; then
 
44
        exit 1
 
45
fi
 
46
exit 0