Show More
@@ -1,203 +1,203 b'' | |||
|
1 | 1 | This file tests the behavior of run-tests.py itself. |
|
2 | 2 | |
|
3 | 3 | Smoke test |
|
4 | 4 | ============ |
|
5 | 5 | |
|
6 | 6 | $ $TESTDIR/run-tests.py |
|
7 | 7 | |
|
8 | 8 | # Ran 0 tests, 0 skipped, 0 warned, 0 failed. |
|
9 | 9 | |
|
10 | 10 | a succesful test |
|
11 | 11 | ======================= |
|
12 | 12 | |
|
13 | 13 | $ cat > test-success.t << EOF |
|
14 | 14 | > $ echo babar |
|
15 | 15 | > babar |
|
16 | 16 | > EOF |
|
17 | 17 | |
|
18 | 18 | $ $TESTDIR/run-tests.py --with-hg=`which hg` |
|
19 | 19 | . |
|
20 | 20 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
|
21 | 21 | |
|
22 | 22 | failing test |
|
23 | 23 | ================== |
|
24 | 24 | |
|
25 | 25 | $ cat > test-failure.t << EOF |
|
26 | 26 | > $ echo babar |
|
27 | 27 | > rataxes |
|
28 | 28 | > EOF |
|
29 | 29 | |
|
30 | 30 | $ $TESTDIR/run-tests.py --with-hg=`which hg` |
|
31 | 31 | |
|
32 | 32 | --- $TESTTMP/test-failure.t |
|
33 | 33 | +++ $TESTTMP/test-failure.t.err |
|
34 | 34 | @@ -1,2 +1,2 @@ |
|
35 | 35 | $ echo babar |
|
36 | 36 | - rataxes |
|
37 | 37 | + babar |
|
38 | 38 | |
|
39 | 39 | ERROR: test-failure.t output changed |
|
40 | 40 | !. |
|
41 | 41 | Failed test-failure.t: output changed |
|
42 | 42 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
|
43 | 43 | python hash seed: * (glob) |
|
44 | 44 | [1] |
|
45 | 45 | |
|
46 | 46 | test for --retest |
|
47 | 47 | ==================== |
|
48 | 48 | |
|
49 | 49 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --retest |
|
50 | 50 | |
|
51 | 51 | --- $TESTTMP/test-failure.t |
|
52 | 52 | +++ $TESTTMP/test-failure.t.err |
|
53 | 53 | @@ -1,2 +1,2 @@ |
|
54 | 54 | $ echo babar |
|
55 | 55 | - rataxes |
|
56 | 56 | + babar |
|
57 | 57 | |
|
58 | 58 | ERROR: test-failure.t output changed |
|
59 | 59 | ! |
|
60 | 60 | Failed test-failure.t: output changed |
|
61 | 61 | # Ran 1 tests, 1 skipped, 0 warned, 1 failed. |
|
62 | 62 | python hash seed: * (glob) |
|
63 | 63 | [1] |
|
64 | 64 | |
|
65 | 65 | Selecting Tests To Run |
|
66 | 66 | ====================== |
|
67 | 67 | |
|
68 | 68 | successful |
|
69 | 69 | |
|
70 | 70 | $ $TESTDIR/run-tests.py --with-hg=`which hg` test-success.t |
|
71 | 71 | . |
|
72 | 72 | # Ran 1 tests, 0 skipped, 0 warned, 0 failed. |
|
73 | 73 | |
|
74 | 74 | failed |
|
75 | 75 | |
|
76 | 76 | $ $TESTDIR/run-tests.py --with-hg=`which hg` test-failure.t |
|
77 | 77 | |
|
78 | 78 | --- $TESTTMP/test-failure.t |
|
79 | 79 | +++ $TESTTMP/test-failure.t.err |
|
80 | 80 | @@ -1,2 +1,2 @@ |
|
81 | 81 | $ echo babar |
|
82 | 82 | - rataxes |
|
83 | 83 | + babar |
|
84 | 84 | |
|
85 | 85 | ERROR: test-failure.t output changed |
|
86 | 86 | ! |
|
87 | 87 | Failed test-failure.t: output changed |
|
88 | 88 | # Ran 1 tests, 0 skipped, 0 warned, 1 failed. |
|
89 | 89 | python hash seed: * (glob) |
|
90 | 90 | [1] |
|
91 | 91 | |
|
92 | 92 | Running In Debug Mode |
|
93 | 93 | ====================== |
|
94 | 94 | |
|
95 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --debug | grep -v pwd | |
|
95 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --debug 2>&1 | grep -v pwd | |
|
96 | 96 | + echo SALT* 0 0 (glob) |
|
97 | 97 | SALT* 0 0 (glob) |
|
98 | 98 | + echo babar |
|
99 | 99 | babar |
|
100 | 100 | + echo SALT* 2 0 (glob) |
|
101 | 101 | SALT* 2 0 (glob) |
|
102 | 102 | .+ echo SALT* 0 0 (glob) |
|
103 | 103 | SALT* 0 0 (glob) |
|
104 | 104 | + echo babar |
|
105 | 105 | babar |
|
106 | 106 | + echo SALT* 2 0 (glob) |
|
107 | 107 | SALT* 2 0 (glob) |
|
108 | 108 | . |
|
109 | 109 | # Ran 2 tests, 0 skipped, 0 warned, 0 failed. |
|
110 | 110 | |
|
111 | 111 | Parallel runs |
|
112 | 112 | ============== |
|
113 | 113 | |
|
114 | 114 | (duplicate the failing test to get predictable output) |
|
115 | 115 | $ cp test-failure.t test-failure-copy.t |
|
116 | 116 | |
|
117 | 117 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --jobs 2 test-failure*.t |
|
118 | 118 | |
|
119 | 119 | --- $TESTTMP/test-failure*.t (glob) |
|
120 | 120 | +++ $TESTTMP/test-failure*.t.err (glob) |
|
121 | 121 | @@ -1,2 +1,2 @@ |
|
122 | 122 | $ echo babar |
|
123 | 123 | - rataxes |
|
124 | 124 | + babar |
|
125 | 125 | |
|
126 | 126 | ERROR: test-failure*.t output changed (glob) |
|
127 | 127 | ! |
|
128 | 128 | --- $TESTTMP/test-failure*.t (glob) |
|
129 | 129 | +++ $TESTTMP/test-failure*.t.err (glob) |
|
130 | 130 | @@ -1,2 +1,2 @@ |
|
131 | 131 | $ echo babar |
|
132 | 132 | - rataxes |
|
133 | 133 | + babar |
|
134 | 134 | |
|
135 | 135 | ERROR: test-failure*.t output changed (glob) |
|
136 | 136 | ! |
|
137 | 137 | Failed test-failure*.t: output changed (glob) |
|
138 | 138 | Failed test-failure*.t: output changed (glob) |
|
139 | 139 | # Ran 2 tests, 0 skipped, 0 warned, 2 failed. |
|
140 | 140 | python hash seed: * (glob) |
|
141 | 141 | [1] |
|
142 | 142 | |
|
143 | 143 | (delete the duplicated test file) |
|
144 | 144 | $ rm test-failure-copy.t |
|
145 | 145 | |
|
146 | 146 | |
|
147 | 147 | Interactive run |
|
148 | 148 | =============== |
|
149 | 149 | |
|
150 | 150 | (backup the failing test) |
|
151 | 151 | $ cp test-failure.t backup |
|
152 | 152 | |
|
153 | 153 | Refuse the fix |
|
154 | 154 | |
|
155 | 155 | $ echo 'n' | $TESTDIR/run-tests.py --with-hg=`which hg` -i |
|
156 | 156 | |
|
157 | 157 | --- $TESTTMP/test-failure.t |
|
158 | 158 | +++ $TESTTMP/test-failure.t.err |
|
159 | 159 | @@ -1,2 +1,2 @@ |
|
160 | 160 | $ echo babar |
|
161 | 161 | - rataxes |
|
162 | 162 | + babar |
|
163 | 163 | Accept this change? [n] |
|
164 | 164 | ERROR: test-failure.t output changed |
|
165 | 165 | !. |
|
166 | 166 | Failed test-failure.t: output changed |
|
167 | 167 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
|
168 | 168 | python hash seed: * (glob) |
|
169 | 169 | [1] |
|
170 | 170 | |
|
171 | 171 | $ cat test-failure.t |
|
172 | 172 | $ echo babar |
|
173 | 173 | rataxes |
|
174 | 174 | |
|
175 | 175 | Accept the fix |
|
176 | 176 | |
|
177 | 177 | $ echo 'y' | $TESTDIR/run-tests.py --with-hg=`which hg` -i |
|
178 | 178 | |
|
179 | 179 | --- $TESTTMP/test-failure.t |
|
180 | 180 | +++ $TESTTMP/test-failure.t.err |
|
181 | 181 | @@ -1,2 +1,2 @@ |
|
182 | 182 | $ echo babar |
|
183 | 183 | - rataxes |
|
184 | 184 | + babar |
|
185 | 185 | Accept this change? [n] .. |
|
186 | 186 | # Ran 2 tests, 0 skipped, 0 warned, 0 failed. |
|
187 | 187 | |
|
188 | 188 | $ cat test-failure.t |
|
189 | 189 | $ echo babar |
|
190 | 190 | babar |
|
191 | 191 | |
|
192 | 192 | (reinstall) |
|
193 | 193 | $ mv backup test-failure.t |
|
194 | 194 | |
|
195 | 195 | No Diff |
|
196 | 196 | =============== |
|
197 | 197 | |
|
198 | 198 | $ $TESTDIR/run-tests.py --with-hg=`which hg` --nodiff |
|
199 | 199 | !. |
|
200 | 200 | Failed test-failure.t: output changed |
|
201 | 201 | # Ran 2 tests, 0 skipped, 0 warned, 1 failed. |
|
202 | 202 | python hash seed: * (glob) |
|
203 | 203 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now