##// END OF EJS Templates
test-bisect: normalize shell error message...
Martin Geisler -
r9708:a9424b6a default
parent child Browse files
Show More
@@ -1,106 +1,106 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 set -e
3 set -e
4
4
5 echo % init
5 echo % init
6 hg init
6 hg init
7
7
8 echo % committing changes
8 echo % committing changes
9 count=0
9 count=0
10 echo > a
10 echo > a
11 while test $count -lt 32 ; do
11 while test $count -lt 32 ; do
12 echo 'a' >> a
12 echo 'a' >> a
13 test $count -eq 0 && hg add
13 test $count -eq 0 && hg add
14 hg ci -m "msg $count" -d "$count 0"
14 hg ci -m "msg $count" -d "$count 0"
15 echo % committed changeset $count
15 echo % committed changeset $count
16 count=`expr $count + 1`
16 count=`expr $count + 1`
17 done
17 done
18
18
19 echo % log
19 echo % log
20 hg log
20 hg log
21
21
22 echo % hg up -C
22 echo % hg up -C
23 hg up -C
23 hg up -C
24
24
25 echo % bisect test
25 echo % bisect test
26 hg bisect -r
26 hg bisect -r
27 hg bisect -b
27 hg bisect -b
28 hg bisect -g 1
28 hg bisect -g 1
29 hg bisect -g
29 hg bisect -g
30 echo skip
30 echo skip
31 hg bisect -s
31 hg bisect -s
32 hg bisect -g
32 hg bisect -g
33 hg bisect -g
33 hg bisect -g
34 hg bisect -b
34 hg bisect -b
35 hg bisect -g
35 hg bisect -g
36
36
37 echo % bisect reverse test
37 echo % bisect reverse test
38 hg bisect -r
38 hg bisect -r
39 hg bisect -b null
39 hg bisect -b null
40 hg bisect -g tip
40 hg bisect -g tip
41 hg bisect -g
41 hg bisect -g
42 echo skip
42 echo skip
43 hg bisect -s
43 hg bisect -s
44 hg bisect -g
44 hg bisect -g
45 hg bisect -g
45 hg bisect -g
46 hg bisect -b
46 hg bisect -b
47 hg bisect -g
47 hg bisect -g
48
48
49 hg bisect -r
49 hg bisect -r
50 hg bisect -g tip
50 hg bisect -g tip
51 hg bisect -b tip || echo error
51 hg bisect -b tip || echo error
52
52
53 hg bisect -r
53 hg bisect -r
54 hg bisect -g null
54 hg bisect -g null
55 hg bisect -bU tip
55 hg bisect -bU tip
56 hg id
56 hg id
57
57
58 echo % reproduce AssertionError, issue1228 and issue1182
58 echo % reproduce AssertionError, issue1228 and issue1182
59 hg bisect -r
59 hg bisect -r
60 hg bisect -b 4
60 hg bisect -b 4
61 hg bisect -g 0
61 hg bisect -g 0
62 hg bisect -s
62 hg bisect -s
63 hg bisect -s
63 hg bisect -s
64 hg bisect -s
64 hg bisect -s
65
65
66 echo % reproduce non converging bisect, issue1182
66 echo % reproduce non converging bisect, issue1182
67 hg bisect -r
67 hg bisect -r
68 hg bisect -g 0
68 hg bisect -g 0
69 hg bisect -b 2
69 hg bisect -b 2
70 hg bisect -s
70 hg bisect -s
71
71
72 echo % test no action
72 echo % test no action
73 hg bisect -r
73 hg bisect -r
74 hg bisect || echo failure
74 hg bisect || echo failure
75
75
76 echo % reproduce AssertionError, issue1445
76 echo % reproduce AssertionError, issue1445
77 hg bisect -r
77 hg bisect -r
78 hg bisect -b 6
78 hg bisect -b 6
79 hg bisect -g 0
79 hg bisect -g 0
80 hg bisect -s
80 hg bisect -s
81 hg bisect -s
81 hg bisect -s
82 hg bisect -s
82 hg bisect -s
83 hg bisect -s
83 hg bisect -s
84 hg bisect -g
84 hg bisect -g
85
85
86 set +e
86 set +e
87
87
88 echo % test invalid command
88 echo % test invalid command
89 hg bisect -r
89 hg bisect -r
90 hg bisect --command './foobar' 2>&1 | sed 's/: command/:/'
90 hg bisect --command './foobar' 2>&1 | sed 's|\(/bin/sh: \./foobar:\).*|\1 not found|'
91
91
92 echo % test bisecting command
92 echo % test bisecting command
93 cat > script.py <<EOF
93 cat > script.py <<EOF
94 #!/usr/bin/env python
94 #!/usr/bin/env python
95 import sys
95 import sys
96 from mercurial import ui, hg
96 from mercurial import ui, hg
97 repo = hg.repository(ui.ui(), '.')
97 repo = hg.repository(ui.ui(), '.')
98 if repo['.'].rev() < 6:
98 if repo['.'].rev() < 6:
99 sys.exit(1)
99 sys.exit(1)
100 EOF
100 EOF
101 chmod +x script.py
101 chmod +x script.py
102 hg bisect -r
102 hg bisect -r
103 hg bisect --good tip
103 hg bisect --good tip
104 hg bisect --bad 0
104 hg bisect --bad 0
105 hg bisect --command "`pwd`/script.py"
105 hg bisect --command "`pwd`/script.py"
106 true
106 true
General Comments 0
You need to be logged in to leave comments. Login now