comparison tests/run-tests @ 399:f060d728fe54

Delete error logs one test at a time -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Delete error logs one test at a time manifest hash: 746674a89f762a39cf1a679a258a92cd02440f95 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCuL3ZywK+sNU5EO8RAmYeAJ4uUd+zBdGx/H/CGKxXLjKX0vlDBwCfVRAA zVnvyYT9CnmsctYE0NKXVVU= =G53w -----END PGP SIGNATURE-----
author mpm@selenic.com
date Tue, 21 Jun 2005 17:24:41 -0800
parents 7ed217cfae9e
children 688d03d6997a
comparison
equal deleted inserted replaced
398:7ed217cfae9e 399:f060d728fe54
19 cd $H 19 cd $H
20 rm install.err 20 rm install.err
21 21
22 function run_one 22 function run_one
23 { 23 {
24 rm -f $1.err
24 export TZ=GMT 25 export TZ=GMT
25 D=`mktemp -d` 26 D=`mktemp -d`
26 if [ "$D" == "" ] ; then 27 if [ "$D" == "" ] ; then
27 echo mktemp failed! 28 echo mktemp failed!
28 fi 29 fi
29 30
30 cd $D 31 cd $D
31 fail=0 32 fail=0
32 33
33 if ! $H/$f > .out 2>&1 ; then 34 if ! $H/$1 > .out 2>&1 ; then
34 echo $f failed with error code $? 35 echo $1 failed with error code $?
35 fail=1 36 fail=1
36 fi 37 fi
37 38
38 if [ -s .out -a ! -r $H/$f.out ] ; then 39 if [ -s .out -a ! -r $H/$1.out ] ; then
39 echo $f generated unexpected output: 40 echo $1 generated unexpected output:
40 cat .out 41 cat .out
41 cp .out $H/$f.err 42 cp .out $H/$1.err
42 fail=1 43 fail=1
43 elif [ -r $H/$f.out ] && ! diff -u $H/$f.out .out > /dev/null ; then 44 elif [ -r $H/$1.out ] && ! diff -u $H/$1.out .out > /dev/null ; then
44 echo $f output changed: 45 echo $1 output changed:
45 diff -u $H/$f.out .out && true 46 diff -u $H/$1.out .out && true
46 cp .out $H/$f.err 47 cp .out $H/$1.err
47 fail=1 48 fail=1
48 fi 49 fi
49 50
50 cd $H 51 cd $H
51 rm -r $D 52 rm -r $D
54 55
55 TESTS=$@ 56 TESTS=$@
56 if [ "$TESTS" == "" ] ; then 57 if [ "$TESTS" == "" ] ; then
57 TESTS=`ls test-* | grep -Ev "\.|~"` 58 TESTS=`ls test-* | grep -Ev "\.|~"`
58 fi 59 fi
59
60 rm -f test-*.err
61 60
62 for f in $TESTS ; do 61 for f in $TESTS ; do
63 echo -n "." 62 echo -n "."
64 if ! run_one $f ; then 63 if ! run_one $f ; then
65 failed=$[$failed + 1] 64 failed=$[$failed + 1]