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