##// END OF EJS Templates
[PATCH] Set locale before run-tests does anything...
mpm@selenic.com -
r488:77c66c4e default
parent child Browse files
Show More
@@ -1,83 +1,98 b''
1 1 #!/bin/bash
2 2
3 3 set -e
4 4
5 export LANG=C
6 export LC_CTYPE="C"
7 export LC_NUMERIC="C"
8 export LC_TIME="C"
9 export LC_COLLATE="C"
10 export LC_MONETARY="C"
11 export LC_MESSAGES="C"
12 export LC_PAPER="C"
13 export LC_NAME="C"
14 export LC_ADDRESS="C"
15 export LC_TELEPHONE="C"
16 export LC_MEASUREMENT="C"
17 export LC_IDENTIFICATION="C"
18 export LC_ALL=""
19
5 20 tests=0
6 21 failed=0
7 22 H=$PWD
8 23
9 24 if [ -d /usr/lib64 ]; then
10 25 lib=lib64
11 26 else
12 27 lib=lib
13 28 fi
14 29
15 30 TESTPATH=$PWD/install/bin
16 31 export PATH=$TESTPATH:$PATH
17 32 export PYTHONPATH=$PWD/install/$lib/python
18 33
19 34 rm -rf install
20 35 cd ..
21 36 ${PYTHON:-python} setup.py install --home=tests/install > tests/install.err
22 37 if [ $? != 0 ] ; then
23 38 cat tests/install.err
24 39 fi
25 40 cd $H
26 41 rm install.err
27 42
28 43 function run_one
29 44 {
30 45 rm -f $1.err
31 46 export TZ=GMT
32 47 D=`mktemp -d`
33 48 if [ "$D" == "" ] ; then
34 49 echo mktemp failed!
35 50 fi
36 51
37 52 cd $D
38 53 fail=0
39 54
40 55 if ! $H/$1 > .out 2>&1 ; then
41 56 echo $1 failed with error code $?
42 57 fail=1
43 58 fi
44 59
45 60 if [ -s .out -a ! -r $H/$1.out ] ; then
46 61 echo $1 generated unexpected output:
47 62 cat .out
48 63 cp .out $H/$1.err
49 64 fail=1
50 65 elif [ -r $H/$1.out ] && ! diff -u $H/$1.out .out > /dev/null ; then
51 66 echo $1 output changed:
52 67 diff -u $H/$1.out .out && true
53 68 cp .out $H/$1.err
54 69 fail=1
55 70 fi
56 71
57 72 cd $H
58 73 rm -r $D
59 74 return $fail
60 75 }
61 76
62 77 TESTS=$@
63 78 if [ "$TESTS" == "" ] ; then
64 79 TESTS=`ls test-* | grep -Ev "\.|~"`
65 80 fi
66 81
67 82 for f in $TESTS ; do
68 83 echo -n "."
69 84 if ! run_one $f ; then
70 85 failed=$[$failed + 1]
71 86 fi
72 87 tests=$[$tests + 1]
73 88 done
74 89
75 90 rm -rf install
76 91
77 92 echo
78 93 echo Ran $tests tests, $failed failed
79 94
80 95 if [ $failed -gt 0 ] ; then
81 96 exit 1
82 97 fi
83 98
@@ -1,47 +1,47 b''
1 1 + mkdir t
2 2 + cd t
3 3 + hg init
4 4 + hg id
5 5 unknown
6 6 + echo a
7 7 + hg add a
8 8 + hg commit -t test -u test -d '0 0'
9 9 + hg co
10 10 + hg identify
11 11 acb14030fe0a tip
12 12 ++ hg -q tip
13 13 ++ cut -d : -f 2
14 14 + T=acb14030fe0a21b60322c440ad2d20cf7685a376
15 15 + echo 'acb14030fe0a21b60322c440ad2d20cf7685a376 first'
16 16 + cat .hgtags
17 17 acb14030fe0a21b60322c440ad2d20cf7685a376 first
18 18 + hg add .hgtags
19 19 + hg commit -t 'add tags' -u test -d '0 0'
20 20 + hg tags
21 21 tip 1:b9154636be938d3d431e75a7c906504a079bfe07
22 22 first 0:acb14030fe0a21b60322c440ad2d20cf7685a376
23 23 + hg identify
24 24 b9154636be93 tip
25 25 + echo bb
26 26 + hg status
27 27 C a
28 28 + hg identify
29 29 b9154636be93+ tip
30 30 + hg co first
31 31 + hg id
32 32 acb14030fe0a+ first
33 33 + hg -v id
34 34 acb14030fe0a21b60322c440ad2d20cf7685a376+ first
35 35 + hg status
36 36 C a
37 37 + echo 1
38 38 + hg add b
39 39 + hg commit -t branch -u test -d '0 0'
40 40 + hg id
41 41 c8edf04160c7 tip
42 42 + hg co -m 1
43 43 + hg id
44 44 c8edf04160c7+b9154636be93+ tip
45 45 + hg status
46 C a
46 47 C .hgtags
47 C a
General Comments 0
You need to be logged in to leave comments. Login now