author | Thomas Arendsen Hein <thomas@intevation.de> |
Fri, 29 Jul 2005 15:59:10 +0100 | |
changeset 802 | 69db1e34378b |
parent 798 | c28f9feb7c2e |
child 803 | 3d47e7fc33a3 |
permissions | -rwxr-xr-x |
544
3d4d5f2aba9a
Remove bashisms and use /bin/sh instead of /bin/bash.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
495
diff
changeset
|
1 |
#!/bin/sh -e |
331 | 2 |
|
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
3 |
LANG="C"; export LANG |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
4 |
LC_CTYPE="C"; export LC_CTYPE |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
5 |
LC_NUMERIC="C"; export LC_NUMERIC |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
6 |
LC_TIME="C"; export LC_TIME |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
7 |
LC_COLLATE="C"; export LC_COLLATE |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
8 |
LC_MONETARY="C"; export LC_MONETARY |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
9 |
LC_MESSAGES="C"; export LC_MESSAGES |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
10 |
LC_PAPER="C"; export LC_PAPER |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
11 |
LC_NAME="C"; export LC_NAME |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
12 |
LC_ADDRESS="C"; export LC_ADDRESS |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
13 |
LC_TELEPHONE="C"; export LC_TELEPHONE |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
14 |
LC_MEASUREMENT="C"; export LC_MEASUREMENT |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
15 |
LC_IDENTIFICATION="C"; export LC_IDENTIFICATION |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
16 |
LC_ALL=""; export LC_ALL |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
17 |
TZ=GMT; export TZ |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
18 |
HGEDITOR=true; export HGEDITOR |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
19 |
HGMERGE=true; export HGMERGE |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
20 |
HGUSER="test"; export HGUSER |
488
77c66c4eec0e
[PATCH] Set locale before run-tests does anything
mpm@selenic.com
parents:
473
diff
changeset
|
21 |
|
489 | 22 |
umask 022 |
23 |
||
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
24 |
if [ "$[1+1]" = "2" ]; then |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
25 |
use_arithmetic=true |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
26 |
else |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
27 |
use_arithmetic=false |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
28 |
fi |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
29 |
|
331 | 30 |
tests=0 |
31 |
failed=0 |
|
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
32 |
|
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
33 |
HGTMP="" |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
34 |
cleanup_exit() { |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
35 |
rm -rf "$HGTMP" |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
36 |
exit $1 |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
37 |
} |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
38 |
|
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
39 |
# Remove temporary files even if we get interrupted |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
40 |
trap "cleanup_exit 255" TERM KILL INT QUIT ABRT |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
41 |
|
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
42 |
HGTMP="${TMPDIR-/tmp}/hgtests.$RANDOM.$RANDOM.$RANDOM.$$" |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
43 |
(umask 077 && mkdir "$HGTMP") || { |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
44 |
echo "Could not create temporary directory! Exiting." 1>&2 |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
45 |
exit 1 |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
46 |
} |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
47 |
|
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
48 |
TESTDIR="$PWD" |
331 | 49 |
|
473
5914e27dc717
[PATCH] Get run-tests working on 64-bit machines.
mpm@selenic.com
parents:
429
diff
changeset
|
50 |
if [ -d /usr/lib64 ]; then |
5914e27dc717
[PATCH] Get run-tests working on 64-bit machines.
mpm@selenic.com
parents:
429
diff
changeset
|
51 |
lib=lib64 |
5914e27dc717
[PATCH] Get run-tests working on 64-bit machines.
mpm@selenic.com
parents:
429
diff
changeset
|
52 |
else |
5914e27dc717
[PATCH] Get run-tests working on 64-bit machines.
mpm@selenic.com
parents:
429
diff
changeset
|
53 |
lib=lib |
5914e27dc717
[PATCH] Get run-tests working on 64-bit machines.
mpm@selenic.com
parents:
429
diff
changeset
|
54 |
fi |
5914e27dc717
[PATCH] Get run-tests working on 64-bit machines.
mpm@selenic.com
parents:
429
diff
changeset
|
55 |
|
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
56 |
INST="$HGTMP/install" |
397
e5683db23ec4
From: Andrew Thompson <andrewkt@aktzero.com>
mpm@selenic.com
parents:
382
diff
changeset
|
57 |
cd .. |
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
58 |
if ${PYTHON:-python} setup.py install --home="$INST" > tests/install.err 2>&1 |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
59 |
then |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
60 |
rm tests/install.err |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
61 |
mv "$INST/bin/hg" "$INST/bin/hg.real" |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
62 |
( |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
63 |
echo '#!/bin/sh' |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
64 |
echo 'echo "+ hg $@"' |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
65 |
echo 'exec hg.real "$@"' |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
66 |
) > "$INST/bin/hg" |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
67 |
chmod 755 "$INST/bin/hg" |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
68 |
else |
398 | 69 |
cat tests/install.err |
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
70 |
cleanup_exit 1 |
398 | 71 |
fi |
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
72 |
cd "$TESTDIR" |
397
e5683db23ec4
From: Andrew Thompson <andrewkt@aktzero.com>
mpm@selenic.com
parents:
382
diff
changeset
|
73 |
|
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
74 |
PATH="$INST/bin:$PATH"; export PATH |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
75 |
PYTHONPATH="$INST/$lib/python"; export PYTHONPATH |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
76 |
|
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
77 |
|
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
78 |
run_one() { |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
79 |
rm -f "$1.err" |
331 | 80 |
|
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
81 |
mkdir "$HGTMP/$1" |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
82 |
cd "$HGTMP/$1" |
331 | 83 |
fail=0 |
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
84 |
HOME="$HGTMP/$1"; export HOME |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
85 |
OUT="$HGTMP/$1.out" |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
86 |
OUTOK="$TESTDIR/$1.out" |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
87 |
ERR="$TESTDIR/$1.err" |
362
410373162036
run-tests: run tests given on the command line
mpm@selenic.com
parents:
350
diff
changeset
|
88 |
|
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
89 |
if "$TESTDIR/$1" > "$OUT" 2>&1; then |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
90 |
: no error |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
91 |
else |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
92 |
echo "$1 failed with error code $?" |
331 | 93 |
fail=1 |
94 |
fi |
|
362
410373162036
run-tests: run tests given on the command line
mpm@selenic.com
parents:
350
diff
changeset
|
95 |
|
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
96 |
if [ -s "$OUT" -a ! -s "$OUTOK" ] ; then |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
97 |
cp "$OUT" "$ERR" |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
98 |
echo |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
99 |
echo "$1 generated unexpected output:" |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
100 |
cat "$ERR" |
331 | 101 |
fail=1 |
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
102 |
elif [ -r "$OUTOK" ]; then |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
103 |
if diff -u "$OUTOK" "$OUT" > /dev/null; then |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
104 |
: no differences |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
105 |
else |
802
69db1e34378b
Allow tests for not yet fixed bugs to fail without generating error diff.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
798
diff
changeset
|
106 |
if FIXME="`grep 'FIXME' \"$TESTDIR/$1\"`"; then |
69db1e34378b
Allow tests for not yet fixed bugs to fail without generating error diff.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
798
diff
changeset
|
107 |
echo |
69db1e34378b
Allow tests for not yet fixed bugs to fail without generating error diff.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
798
diff
changeset
|
108 |
echo "$1 failed, but this is ignored because of:" |
69db1e34378b
Allow tests for not yet fixed bugs to fail without generating error diff.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
798
diff
changeset
|
109 |
echo "$FIXME" |
69db1e34378b
Allow tests for not yet fixed bugs to fail without generating error diff.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
798
diff
changeset
|
110 |
else |
69db1e34378b
Allow tests for not yet fixed bugs to fail without generating error diff.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
798
diff
changeset
|
111 |
cp "$OUT" "$ERR" |
69db1e34378b
Allow tests for not yet fixed bugs to fail without generating error diff.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
798
diff
changeset
|
112 |
echo |
69db1e34378b
Allow tests for not yet fixed bugs to fail without generating error diff.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
798
diff
changeset
|
113 |
echo "$1 output changed:" |
69db1e34378b
Allow tests for not yet fixed bugs to fail without generating error diff.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
798
diff
changeset
|
114 |
diff -u "$OUTOK" "$ERR" || true |
69db1e34378b
Allow tests for not yet fixed bugs to fail without generating error diff.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
798
diff
changeset
|
115 |
fail=1 |
69db1e34378b
Allow tests for not yet fixed bugs to fail without generating error diff.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
798
diff
changeset
|
116 |
fi |
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
117 |
fi |
331 | 118 |
fi |
119 |
||
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
120 |
cd "$TESTDIR" |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
121 |
rm -f "$HGTMP/$1.out" |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
122 |
rm -rf "$HGTMP/$1" |
362
410373162036
run-tests: run tests given on the command line
mpm@selenic.com
parents:
350
diff
changeset
|
123 |
return $fail |
410373162036
run-tests: run tests given on the command line
mpm@selenic.com
parents:
350
diff
changeset
|
124 |
} |
331 | 125 |
|
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
126 |
TESTS="$@" |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
127 |
if [ -z "$TESTS" ] ; then |
362
410373162036
run-tests: run tests given on the command line
mpm@selenic.com
parents:
350
diff
changeset
|
128 |
TESTS=`ls test-* | grep -Ev "\.|~"` |
410373162036
run-tests: run tests given on the command line
mpm@selenic.com
parents:
350
diff
changeset
|
129 |
fi |
410373162036
run-tests: run tests given on the command line
mpm@selenic.com
parents:
350
diff
changeset
|
130 |
|
410373162036
run-tests: run tests given on the command line
mpm@selenic.com
parents:
350
diff
changeset
|
131 |
for f in $TESTS ; do |
410373162036
run-tests: run tests given on the command line
mpm@selenic.com
parents:
350
diff
changeset
|
132 |
echo -n "." |
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
133 |
if $use_arithmetic; then |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
134 |
run_one $f || failed=$[$failed + 1] |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
135 |
tests=$[$tests + 1] |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
136 |
else |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
137 |
run_one $f || failed=1 |
362
410373162036
run-tests: run tests given on the command line
mpm@selenic.com
parents:
350
diff
changeset
|
138 |
fi |
331 | 139 |
done |
140 |
||
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
141 |
if $use_arithmetic; then |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
142 |
echo |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
143 |
echo "Ran $tests tests, $failed failed." |
331 | 144 |
|
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
145 |
if [ $failed -gt 0 ] ; then |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
146 |
cleanup_exit 1 |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
147 |
fi |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
148 |
else |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
149 |
echo |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
150 |
if [ "$failed" = "1" ] ; then |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
151 |
echo "Ran tests, at least one failed." |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
152 |
cleanup_exit 1 |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
153 |
else |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
154 |
echo "Ran tests, none failed." |
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
155 |
fi |
331 | 156 |
fi |
798
c28f9feb7c2e
Make tests work on Solaris:
Thomas Arendsen Hein <thomas@intevation.de>
parents:
793
diff
changeset
|
157 |
cleanup_exit 0 |