Show More
@@ -1,1474 +1,1471 b'' | |||||
1 | This file tests the behavior of run-tests.py itself. |
|
1 | This file tests the behavior of run-tests.py itself. | |
2 |
|
2 | |||
3 | Avoid interference from actual test env: |
|
3 | Avoid interference from actual test env: | |
4 |
|
4 | |||
5 | $ . "$TESTDIR/helper-runtests.sh" |
|
5 | $ . "$TESTDIR/helper-runtests.sh" | |
6 |
|
6 | |||
7 | Smoke test with install |
|
7 | Smoke test with install | |
8 | ============ |
|
8 | ============ | |
9 |
|
9 | |||
10 | $ run-tests.py $HGTEST_RUN_TESTS_PURE -l |
|
10 | $ run-tests.py $HGTEST_RUN_TESTS_PURE -l | |
11 |
|
11 | |||
12 | # Ran 0 tests, 0 skipped, 0 failed. |
|
12 | # Ran 0 tests, 0 skipped, 0 failed. | |
13 |
|
13 | |||
14 | Define a helper to avoid the install step |
|
14 | Define a helper to avoid the install step | |
15 | ============= |
|
15 | ============= | |
16 | $ rt() |
|
16 | $ rt() | |
17 | > { |
|
17 | > { | |
18 | > run-tests.py --with-hg=`which hg` "$@" |
|
18 | > run-tests.py --with-hg=`which hg` "$@" | |
19 | > } |
|
19 | > } | |
20 |
|
20 | |||
21 | error paths |
|
21 | error paths | |
22 |
|
22 | |||
23 | #if symlink |
|
23 | #if symlink | |
24 | $ ln -s `which true` hg |
|
24 | $ ln -s `which true` hg | |
25 | $ run-tests.py --with-hg=./hg |
|
25 | $ run-tests.py --with-hg=./hg | |
26 | warning: --with-hg should specify an hg script |
|
26 | warning: --with-hg should specify an hg script | |
27 |
|
27 | |||
28 | # Ran 0 tests, 0 skipped, 0 failed. |
|
28 | # Ran 0 tests, 0 skipped, 0 failed. | |
29 | $ rm hg |
|
29 | $ rm hg | |
30 | #endif |
|
30 | #endif | |
31 |
|
31 | |||
32 | #if execbit |
|
32 | #if execbit | |
33 | $ touch hg |
|
33 | $ touch hg | |
34 | $ run-tests.py --with-hg=./hg |
|
34 | $ run-tests.py --with-hg=./hg | |
35 | Usage: run-tests.py [options] [tests] |
|
35 | Usage: run-tests.py [options] [tests] | |
36 |
|
36 | |||
37 | run-tests.py: error: --with-hg must specify an executable hg script |
|
37 | run-tests.py: error: --with-hg must specify an executable hg script | |
38 | [2] |
|
38 | [2] | |
39 | $ rm hg |
|
39 | $ rm hg | |
40 | #endif |
|
40 | #endif | |
41 |
|
41 | |||
42 | Features for testing optional lines |
|
42 | Features for testing optional lines | |
43 | =================================== |
|
43 | =================================== | |
44 |
|
44 | |||
45 | $ cat > hghaveaddon.py <<EOF |
|
45 | $ cat > hghaveaddon.py <<EOF | |
46 | > import hghave |
|
46 | > import hghave | |
47 | > @hghave.check("custom", "custom hghave feature") |
|
47 | > @hghave.check("custom", "custom hghave feature") | |
48 | > def has_custom(): |
|
48 | > def has_custom(): | |
49 | > return True |
|
49 | > return True | |
50 | > @hghave.check("missing", "missing hghave feature") |
|
50 | > @hghave.check("missing", "missing hghave feature") | |
51 | > def has_missing(): |
|
51 | > def has_missing(): | |
52 | > return False |
|
52 | > return False | |
53 | > EOF |
|
53 | > EOF | |
54 |
|
54 | |||
55 | an empty test |
|
55 | an empty test | |
56 | ======================= |
|
56 | ======================= | |
57 |
|
57 | |||
58 | $ touch test-empty.t |
|
58 | $ touch test-empty.t | |
59 | $ rt |
|
59 | $ rt | |
60 | . |
|
60 | . | |
61 | # Ran 1 tests, 0 skipped, 0 failed. |
|
61 | # Ran 1 tests, 0 skipped, 0 failed. | |
62 | $ rm test-empty.t |
|
62 | $ rm test-empty.t | |
63 |
|
63 | |||
64 | a succesful test |
|
64 | a succesful test | |
65 | ======================= |
|
65 | ======================= | |
66 |
|
66 | |||
67 | $ cat > test-success.t << EOF |
|
67 | $ cat > test-success.t << EOF | |
68 | > $ echo babar |
|
68 | > $ echo babar | |
69 | > babar |
|
69 | > babar | |
70 | > $ echo xyzzy |
|
70 | > $ echo xyzzy | |
71 | > dont_print (?) |
|
71 | > dont_print (?) | |
72 | > nothing[42]line (re) (?) |
|
72 | > nothing[42]line (re) (?) | |
73 | > never*happens (glob) (?) |
|
73 | > never*happens (glob) (?) | |
74 | > more_nothing (?) |
|
74 | > more_nothing (?) | |
75 | > xyzzy |
|
75 | > xyzzy | |
76 | > nor this (?) |
|
76 | > nor this (?) | |
77 | > $ printf 'abc\ndef\nxyz\n' |
|
77 | > $ printf 'abc\ndef\nxyz\n' | |
78 | > 123 (?) |
|
78 | > 123 (?) | |
79 | > abc |
|
79 | > abc | |
80 | > def (?) |
|
80 | > def (?) | |
81 | > 456 (?) |
|
81 | > 456 (?) | |
82 | > xyz |
|
82 | > xyz | |
83 | > $ printf 'zyx\nwvu\ntsr\n' |
|
83 | > $ printf 'zyx\nwvu\ntsr\n' | |
84 | > abc (?) |
|
84 | > abc (?) | |
85 | > zyx (custom !) |
|
85 | > zyx (custom !) | |
86 | > wvu |
|
86 | > wvu | |
87 | > no_print (no-custom !) |
|
87 | > no_print (no-custom !) | |
88 | > tsr (no-missing !) |
|
88 | > tsr (no-missing !) | |
89 | > missing (missing !) |
|
89 | > missing (missing !) | |
90 | > EOF |
|
90 | > EOF | |
91 |
|
91 | |||
92 | $ rt |
|
92 | $ rt | |
93 | . |
|
93 | . | |
94 | # Ran 1 tests, 0 skipped, 0 failed. |
|
94 | # Ran 1 tests, 0 skipped, 0 failed. | |
95 |
|
95 | |||
96 | failing test |
|
96 | failing test | |
97 | ================== |
|
97 | ================== | |
98 |
|
98 | |||
99 | test churn with globs |
|
99 | test churn with globs | |
100 | $ cat > test-failure.t <<EOF |
|
100 | $ cat > test-failure.t <<EOF | |
101 | > $ echo "bar-baz"; echo "bar-bad" |
|
101 | > $ echo "bar-baz"; echo "bar-bad" | |
102 | > bar*bad (glob) |
|
102 | > bar*bad (glob) | |
103 | > bar*baz (glob) |
|
103 | > bar*baz (glob) | |
104 | > EOF |
|
104 | > EOF | |
105 | $ rt test-failure.t |
|
105 | $ rt test-failure.t | |
106 |
|
106 | |||
107 | --- $TESTTMP/test-failure.t |
|
107 | --- $TESTTMP/test-failure.t | |
108 | +++ $TESTTMP/test-failure.t.err |
|
108 | +++ $TESTTMP/test-failure.t.err | |
109 | @@ -1,3 +1,3 @@ |
|
109 | @@ -1,3 +1,3 @@ | |
110 | $ echo "bar-baz"; echo "bar-bad" |
|
110 | $ echo "bar-baz"; echo "bar-bad" | |
111 | + bar*baz (glob) |
|
111 | + bar*baz (glob) | |
112 | bar*bad (glob) |
|
112 | bar*bad (glob) | |
113 | - bar*baz (glob) |
|
113 | - bar*baz (glob) | |
114 |
|
114 | |||
115 | ERROR: test-failure.t output changed |
|
115 | ERROR: test-failure.t output changed | |
116 | ! |
|
116 | ! | |
117 | Failed test-failure.t: output changed |
|
117 | Failed test-failure.t: output changed | |
118 | # Ran 1 tests, 0 skipped, 1 failed. |
|
118 | # Ran 1 tests, 0 skipped, 1 failed. | |
119 | python hash seed: * (glob) |
|
119 | python hash seed: * (glob) | |
120 | [1] |
|
120 | [1] | |
121 |
|
121 | |||
122 | test diff colorisation |
|
122 | test diff colorisation | |
123 |
|
123 | |||
124 | #if no-windows pygments |
|
124 | #if no-windows pygments | |
125 | $ rt test-failure.t --color always |
|
125 | $ rt test-failure.t --color always | |
126 |
|
126 | |||
127 | \x1b[38;5;124m--- $TESTTMP/test-failure.t\x1b[39m (esc) |
|
127 | \x1b[38;5;124m--- $TESTTMP/test-failure.t\x1b[39m (esc) | |
128 | \x1b[38;5;34m+++ $TESTTMP/test-failure.t.err\x1b[39m (esc) |
|
128 | \x1b[38;5;34m+++ $TESTTMP/test-failure.t.err\x1b[39m (esc) | |
129 | \x1b[38;5;90;01m@@ -1,3 +1,3 @@\x1b[39;00m (esc) |
|
129 | \x1b[38;5;90;01m@@ -1,3 +1,3 @@\x1b[39;00m (esc) | |
130 | $ echo "bar-baz"; echo "bar-bad" |
|
130 | $ echo "bar-baz"; echo "bar-bad" | |
131 | \x1b[38;5;34m+ bar*baz (glob)\x1b[39m (esc) |
|
131 | \x1b[38;5;34m+ bar*baz (glob)\x1b[39m (esc) | |
132 | bar*bad (glob) |
|
132 | bar*bad (glob) | |
133 | \x1b[38;5;124m- bar*baz (glob)\x1b[39m (esc) |
|
133 | \x1b[38;5;124m- bar*baz (glob)\x1b[39m (esc) | |
134 |
|
134 | |||
135 | \x1b[38;5;88mERROR: \x1b[39m\x1b[38;5;9mtest-failure.t\x1b[39m\x1b[38;5;88m output changed\x1b[39m (esc) |
|
135 | \x1b[38;5;88mERROR: \x1b[39m\x1b[38;5;9mtest-failure.t\x1b[39m\x1b[38;5;88m output changed\x1b[39m (esc) | |
136 | ! |
|
136 | ! | |
137 | \x1b[38;5;88mFailed \x1b[39m\x1b[38;5;9mtest-failure.t\x1b[39m\x1b[38;5;88m: output changed\x1b[39m (esc) |
|
137 | \x1b[38;5;88mFailed \x1b[39m\x1b[38;5;9mtest-failure.t\x1b[39m\x1b[38;5;88m: output changed\x1b[39m (esc) | |
138 | # Ran 1 tests, 0 skipped, 1 failed. |
|
138 | # Ran 1 tests, 0 skipped, 1 failed. | |
139 | python hash seed: * (glob) |
|
139 | python hash seed: * (glob) | |
140 | [1] |
|
140 | [1] | |
141 |
|
141 | |||
142 | $ rt test-failure.t 2> tmp.log |
|
142 | $ rt test-failure.t 2> tmp.log | |
143 | [1] |
|
143 | [1] | |
144 | $ cat tmp.log |
|
144 | $ cat tmp.log | |
145 |
|
145 | |||
146 | --- $TESTTMP/test-failure.t |
|
146 | --- $TESTTMP/test-failure.t | |
147 | +++ $TESTTMP/test-failure.t.err |
|
147 | +++ $TESTTMP/test-failure.t.err | |
148 | @@ -1,3 +1,3 @@ |
|
148 | @@ -1,3 +1,3 @@ | |
149 | $ echo "bar-baz"; echo "bar-bad" |
|
149 | $ echo "bar-baz"; echo "bar-bad" | |
150 | + bar*baz (glob) |
|
150 | + bar*baz (glob) | |
151 | bar*bad (glob) |
|
151 | bar*bad (glob) | |
152 | - bar*baz (glob) |
|
152 | - bar*baz (glob) | |
153 |
|
153 | |||
154 | ERROR: test-failure.t output changed |
|
154 | ERROR: test-failure.t output changed | |
155 | ! |
|
155 | ! | |
156 | Failed test-failure.t: output changed |
|
156 | Failed test-failure.t: output changed | |
157 | # Ran 1 tests, 0 skipped, 1 failed. |
|
157 | # Ran 1 tests, 0 skipped, 1 failed. | |
158 | python hash seed: * (glob) |
|
158 | python hash seed: * (glob) | |
159 | #endif |
|
159 | #endif | |
160 |
|
160 | |||
161 | $ cat > test-failure.t << EOF |
|
161 | $ cat > test-failure.t << EOF | |
162 | > $ true |
|
162 | > $ true | |
163 | > should go away (true !) |
|
163 | > should go away (true !) | |
164 | > $ true |
|
164 | > $ true | |
165 | > should stay (false !) |
|
165 | > should stay (false !) | |
166 | > |
|
166 | > | |
167 | > Should remove first line, not second or third |
|
167 | > Should remove first line, not second or third | |
168 | > $ echo 'testing' |
|
168 | > $ echo 'testing' | |
169 | > baz*foo (glob) (true !) |
|
169 | > baz*foo (glob) (true !) | |
170 | > foobar*foo (glob) (false !) |
|
170 | > foobar*foo (glob) (false !) | |
171 | > te*ting (glob) (true !) |
|
171 | > te*ting (glob) (true !) | |
172 | > |
|
172 | > | |
173 | > Should keep first two lines, remove third and last |
|
173 | > Should keep first two lines, remove third and last | |
174 | > $ echo 'testing' |
|
174 | > $ echo 'testing' | |
175 | > test.ng (re) (true !) |
|
175 | > test.ng (re) (true !) | |
176 | > foo.ar (re) (false !) |
|
176 | > foo.ar (re) (false !) | |
177 | > b.r (re) (true !) |
|
177 | > b.r (re) (true !) | |
178 | > missing (?) |
|
178 | > missing (?) | |
179 | > awol (true !) |
|
179 | > awol (true !) | |
180 | > |
|
180 | > | |
181 | > The "missing" line should stay, even though awol is dropped |
|
181 | > The "missing" line should stay, even though awol is dropped | |
182 | > $ echo 'testing' |
|
182 | > $ echo 'testing' | |
183 | > test.ng (re) (true !) |
|
183 | > test.ng (re) (true !) | |
184 | > foo.ar (?) |
|
184 | > foo.ar (?) | |
185 | > awol |
|
185 | > awol | |
186 | > missing (?) |
|
186 | > missing (?) | |
187 | > EOF |
|
187 | > EOF | |
188 | $ rt test-failure.t |
|
188 | $ rt test-failure.t | |
189 |
|
189 | |||
190 | --- $TESTTMP/test-failure.t |
|
190 | --- $TESTTMP/test-failure.t | |
191 | +++ $TESTTMP/test-failure.t.err |
|
191 | +++ $TESTTMP/test-failure.t.err | |
192 | @@ -1,11 +1,9 @@ |
|
192 | @@ -1,11 +1,9 @@ | |
193 | $ true |
|
193 | $ true | |
194 | - should go away (true !) |
|
194 | - should go away (true !) | |
195 | $ true |
|
195 | $ true | |
196 | should stay (false !) |
|
196 | should stay (false !) | |
197 |
|
197 | |||
198 | Should remove first line, not second or third |
|
198 | Should remove first line, not second or third | |
199 | $ echo 'testing' |
|
199 | $ echo 'testing' | |
200 | - baz*foo (glob) (true !) |
|
200 | - baz*foo (glob) (true !) | |
201 | foobar*foo (glob) (false !) |
|
201 | foobar*foo (glob) (false !) | |
202 | te*ting (glob) (true !) |
|
202 | te*ting (glob) (true !) | |
203 |
|
203 | |||
204 | foo.ar (re) (false !) |
|
204 | foo.ar (re) (false !) | |
205 | missing (?) |
|
205 | missing (?) | |
206 | @@ -13,13 +11,10 @@ |
|
206 | @@ -13,13 +11,10 @@ | |
207 | $ echo 'testing' |
|
207 | $ echo 'testing' | |
208 | test.ng (re) (true !) |
|
208 | test.ng (re) (true !) | |
209 | foo.ar (re) (false !) |
|
209 | foo.ar (re) (false !) | |
210 | - b.r (re) (true !) |
|
210 | - b.r (re) (true !) | |
211 | missing (?) |
|
211 | missing (?) | |
212 | - awol (true !) |
|
212 | - awol (true !) | |
213 |
|
213 | |||
214 | The "missing" line should stay, even though awol is dropped |
|
214 | The "missing" line should stay, even though awol is dropped | |
215 | $ echo 'testing' |
|
215 | $ echo 'testing' | |
216 | test.ng (re) (true !) |
|
216 | test.ng (re) (true !) | |
217 | foo.ar (?) |
|
217 | foo.ar (?) | |
218 | - awol |
|
218 | - awol | |
219 | missing (?) |
|
219 | missing (?) | |
220 |
|
220 | |||
221 | ERROR: test-failure.t output changed |
|
221 | ERROR: test-failure.t output changed | |
222 | ! |
|
222 | ! | |
223 | Failed test-failure.t: output changed |
|
223 | Failed test-failure.t: output changed | |
224 | # Ran 1 tests, 0 skipped, 1 failed. |
|
224 | # Ran 1 tests, 0 skipped, 1 failed. | |
225 | python hash seed: * (glob) |
|
225 | python hash seed: * (glob) | |
226 | [1] |
|
226 | [1] | |
227 |
|
227 | |||
228 | basic failing test |
|
228 | basic failing test | |
229 | $ cat > test-failure.t << EOF |
|
229 | $ cat > test-failure.t << EOF | |
230 | > $ echo babar |
|
230 | > $ echo babar | |
231 | > rataxes |
|
231 | > rataxes | |
232 | > This is a noop statement so that |
|
232 | > This is a noop statement so that | |
233 | > this test is still more bytes than success. |
|
233 | > this test is still more bytes than success. | |
234 | > pad pad pad pad............................................................ |
|
234 | > pad pad pad pad............................................................ | |
235 | > pad pad pad pad............................................................ |
|
235 | > pad pad pad pad............................................................ | |
236 | > pad pad pad pad............................................................ |
|
236 | > pad pad pad pad............................................................ | |
237 | > pad pad pad pad............................................................ |
|
237 | > pad pad pad pad............................................................ | |
238 | > pad pad pad pad............................................................ |
|
238 | > pad pad pad pad............................................................ | |
239 | > pad pad pad pad............................................................ |
|
239 | > pad pad pad pad............................................................ | |
240 | > EOF |
|
240 | > EOF | |
241 |
|
241 | |||
242 | >>> fh = open('test-failure-unicode.t', 'wb') |
|
242 | >>> fh = open('test-failure-unicode.t', 'wb') | |
243 | >>> fh.write(u' $ echo babar\u03b1\n'.encode('utf-8')) and None |
|
243 | >>> fh.write(u' $ echo babar\u03b1\n'.encode('utf-8')) and None | |
244 | >>> fh.write(u' l\u03b5\u03b5t\n'.encode('utf-8')) and None |
|
244 | >>> fh.write(u' l\u03b5\u03b5t\n'.encode('utf-8')) and None | |
245 |
|
245 | |||
246 | $ rt |
|
246 | $ rt | |
247 |
|
247 | |||
248 | --- $TESTTMP/test-failure.t |
|
248 | --- $TESTTMP/test-failure.t | |
249 | +++ $TESTTMP/test-failure.t.err |
|
249 | +++ $TESTTMP/test-failure.t.err | |
250 | @@ -1,5 +1,5 @@ |
|
250 | @@ -1,5 +1,5 @@ | |
251 | $ echo babar |
|
251 | $ echo babar | |
252 | - rataxes |
|
252 | - rataxes | |
253 | + babar |
|
253 | + babar | |
254 | This is a noop statement so that |
|
254 | This is a noop statement so that | |
255 | this test is still more bytes than success. |
|
255 | this test is still more bytes than success. | |
256 | pad pad pad pad............................................................ |
|
256 | pad pad pad pad............................................................ | |
257 |
|
257 | |||
258 | ERROR: test-failure.t output changed |
|
258 | ERROR: test-failure.t output changed | |
259 | !. |
|
259 | !. | |
260 | --- $TESTTMP/test-failure-unicode.t |
|
260 | --- $TESTTMP/test-failure-unicode.t | |
261 | +++ $TESTTMP/test-failure-unicode.t.err |
|
261 | +++ $TESTTMP/test-failure-unicode.t.err | |
262 | @@ -1,2 +1,2 @@ |
|
262 | @@ -1,2 +1,2 @@ | |
263 | $ echo babar\xce\xb1 (esc) |
|
263 | $ echo babar\xce\xb1 (esc) | |
264 | - l\xce\xb5\xce\xb5t (esc) |
|
264 | - l\xce\xb5\xce\xb5t (esc) | |
265 | + babar\xce\xb1 (esc) |
|
265 | + babar\xce\xb1 (esc) | |
266 |
|
266 | |||
267 | ERROR: test-failure-unicode.t output changed |
|
267 | ERROR: test-failure-unicode.t output changed | |
268 | ! |
|
268 | ! | |
269 | Failed test-failure.t: output changed |
|
269 | Failed test-failure.t: output changed | |
270 | Failed test-failure-unicode.t: output changed |
|
270 | Failed test-failure-unicode.t: output changed | |
271 | # Ran 3 tests, 0 skipped, 2 failed. |
|
271 | # Ran 3 tests, 0 skipped, 2 failed. | |
272 | python hash seed: * (glob) |
|
272 | python hash seed: * (glob) | |
273 | [1] |
|
273 | [1] | |
274 |
|
274 | |||
275 | test --outputdir |
|
275 | test --outputdir | |
276 | $ mkdir output |
|
276 | $ mkdir output | |
277 | $ rt --outputdir output |
|
277 | $ rt --outputdir output | |
278 |
|
278 | |||
279 | --- $TESTTMP/test-failure.t |
|
279 | --- $TESTTMP/test-failure.t | |
280 | +++ $TESTTMP/output/test-failure.t.err |
|
280 | +++ $TESTTMP/output/test-failure.t.err | |
281 | @@ -1,5 +1,5 @@ |
|
281 | @@ -1,5 +1,5 @@ | |
282 | $ echo babar |
|
282 | $ echo babar | |
283 | - rataxes |
|
283 | - rataxes | |
284 | + babar |
|
284 | + babar | |
285 | This is a noop statement so that |
|
285 | This is a noop statement so that | |
286 | this test is still more bytes than success. |
|
286 | this test is still more bytes than success. | |
287 | pad pad pad pad............................................................ |
|
287 | pad pad pad pad............................................................ | |
288 |
|
288 | |||
289 | ERROR: test-failure.t output changed |
|
289 | ERROR: test-failure.t output changed | |
290 | !. |
|
290 | !. | |
291 | --- $TESTTMP/test-failure-unicode.t |
|
291 | --- $TESTTMP/test-failure-unicode.t | |
292 | +++ $TESTTMP/output/test-failure-unicode.t.err |
|
292 | +++ $TESTTMP/output/test-failure-unicode.t.err | |
293 | @@ -1,2 +1,2 @@ |
|
293 | @@ -1,2 +1,2 @@ | |
294 | $ echo babar\xce\xb1 (esc) |
|
294 | $ echo babar\xce\xb1 (esc) | |
295 | - l\xce\xb5\xce\xb5t (esc) |
|
295 | - l\xce\xb5\xce\xb5t (esc) | |
296 | + babar\xce\xb1 (esc) |
|
296 | + babar\xce\xb1 (esc) | |
297 |
|
297 | |||
298 | ERROR: test-failure-unicode.t output changed |
|
298 | ERROR: test-failure-unicode.t output changed | |
299 | ! |
|
299 | ! | |
300 | Failed test-failure.t: output changed |
|
300 | Failed test-failure.t: output changed | |
301 | Failed test-failure-unicode.t: output changed |
|
301 | Failed test-failure-unicode.t: output changed | |
302 | # Ran 3 tests, 0 skipped, 2 failed. |
|
302 | # Ran 3 tests, 0 skipped, 2 failed. | |
303 | python hash seed: * (glob) |
|
303 | python hash seed: * (glob) | |
304 | [1] |
|
304 | [1] | |
305 | $ ls -a output |
|
305 | $ ls -a output | |
306 | . |
|
306 | . | |
307 | .. |
|
307 | .. | |
308 | .testtimes |
|
308 | .testtimes | |
309 | test-failure-unicode.t.err |
|
309 | test-failure-unicode.t.err | |
310 | test-failure.t.err |
|
310 | test-failure.t.err | |
311 |
|
311 | |||
312 | test --xunit support |
|
312 | test --xunit support | |
313 | $ rt --xunit=xunit.xml |
|
313 | $ rt --xunit=xunit.xml | |
314 |
|
314 | |||
315 | --- $TESTTMP/test-failure.t |
|
315 | --- $TESTTMP/test-failure.t | |
316 | +++ $TESTTMP/test-failure.t.err |
|
316 | +++ $TESTTMP/test-failure.t.err | |
317 | @@ -1,5 +1,5 @@ |
|
317 | @@ -1,5 +1,5 @@ | |
318 | $ echo babar |
|
318 | $ echo babar | |
319 | - rataxes |
|
319 | - rataxes | |
320 | + babar |
|
320 | + babar | |
321 | This is a noop statement so that |
|
321 | This is a noop statement so that | |
322 | this test is still more bytes than success. |
|
322 | this test is still more bytes than success. | |
323 | pad pad pad pad............................................................ |
|
323 | pad pad pad pad............................................................ | |
324 |
|
324 | |||
325 | ERROR: test-failure.t output changed |
|
325 | ERROR: test-failure.t output changed | |
326 | !. |
|
326 | !. | |
327 | --- $TESTTMP/test-failure-unicode.t |
|
327 | --- $TESTTMP/test-failure-unicode.t | |
328 | +++ $TESTTMP/test-failure-unicode.t.err |
|
328 | +++ $TESTTMP/test-failure-unicode.t.err | |
329 | @@ -1,2 +1,2 @@ |
|
329 | @@ -1,2 +1,2 @@ | |
330 | $ echo babar\xce\xb1 (esc) |
|
330 | $ echo babar\xce\xb1 (esc) | |
331 | - l\xce\xb5\xce\xb5t (esc) |
|
331 | - l\xce\xb5\xce\xb5t (esc) | |
332 | + babar\xce\xb1 (esc) |
|
332 | + babar\xce\xb1 (esc) | |
333 |
|
333 | |||
334 | ERROR: test-failure-unicode.t output changed |
|
334 | ERROR: test-failure-unicode.t output changed | |
335 | ! |
|
335 | ! | |
336 | Failed test-failure.t: output changed |
|
336 | Failed test-failure.t: output changed | |
337 | Failed test-failure-unicode.t: output changed |
|
337 | Failed test-failure-unicode.t: output changed | |
338 | # Ran 3 tests, 0 skipped, 2 failed. |
|
338 | # Ran 3 tests, 0 skipped, 2 failed. | |
339 | python hash seed: * (glob) |
|
339 | python hash seed: * (glob) | |
340 | [1] |
|
340 | [1] | |
341 | $ cat xunit.xml |
|
341 | $ cat xunit.xml | |
342 | <?xml version="1.0" encoding="utf-8"?> |
|
342 | <?xml version="1.0" encoding="utf-8"?> | |
343 | <testsuite errors="0" failures="2" name="run-tests" skipped="0" tests="3"> |
|
343 | <testsuite errors="0" failures="2" name="run-tests" skipped="0" tests="3"> | |
344 | <testcase name="test-success.t" time="*"/> (glob) |
|
344 | <testcase name="test-success.t" time="*"/> (glob) | |
345 | <testcase name="test-failure-unicode.t" time="*"> (glob) |
|
345 | <testcase name="test-failure-unicode.t" time="*"> (glob) | |
346 | <failure message="output changed" type="output-mismatch"> |
|
346 | <failure message="output changed" type="output-mismatch"> | |
347 | <![CDATA[--- $TESTTMP/test-failure-unicode.t |
|
347 | <![CDATA[--- $TESTTMP/test-failure-unicode.t | |
348 | +++ $TESTTMP/test-failure-unicode.t.err |
|
348 | +++ $TESTTMP/test-failure-unicode.t.err | |
349 | @@ -1,2 +1,2 @@ |
|
349 | @@ -1,2 +1,2 @@ | |
350 | $ echo babar\xce\xb1 (esc) |
|
350 | $ echo babar\xce\xb1 (esc) | |
351 | - l\xce\xb5\xce\xb5t (esc) |
|
351 | - l\xce\xb5\xce\xb5t (esc) | |
352 | + babar\xce\xb1 (esc) |
|
352 | + babar\xce\xb1 (esc) | |
353 | ]]> </failure> |
|
353 | ]]> </failure> | |
354 | </testcase> |
|
354 | </testcase> | |
355 | <testcase name="test-failure.t" time="*"> (glob) |
|
355 | <testcase name="test-failure.t" time="*"> (glob) | |
356 | <failure message="output changed" type="output-mismatch"> |
|
356 | <failure message="output changed" type="output-mismatch"> | |
357 | <![CDATA[--- $TESTTMP/test-failure.t |
|
357 | <![CDATA[--- $TESTTMP/test-failure.t | |
358 | +++ $TESTTMP/test-failure.t.err |
|
358 | +++ $TESTTMP/test-failure.t.err | |
359 | @@ -1,5 +1,5 @@ |
|
359 | @@ -1,5 +1,5 @@ | |
360 | $ echo babar |
|
360 | $ echo babar | |
361 | - rataxes |
|
361 | - rataxes | |
362 | + babar |
|
362 | + babar | |
363 | This is a noop statement so that |
|
363 | This is a noop statement so that | |
364 | this test is still more bytes than success. |
|
364 | this test is still more bytes than success. | |
365 | pad pad pad pad............................................................ |
|
365 | pad pad pad pad............................................................ | |
366 | ]]> </failure> |
|
366 | ]]> </failure> | |
367 | </testcase> |
|
367 | </testcase> | |
368 | </testsuite> |
|
368 | </testsuite> | |
369 |
|
369 | |||
370 | $ cat .testtimes |
|
370 | $ cat .testtimes | |
371 | test-failure-unicode.t * (glob) |
|
371 | test-failure-unicode.t * (glob) | |
372 | test-failure.t * (glob) |
|
372 | test-failure.t * (glob) | |
373 | test-success.t * (glob) |
|
373 | test-success.t * (glob) | |
374 |
|
374 | |||
375 | $ rt --list-tests |
|
375 | $ rt --list-tests | |
376 | test-failure-unicode.t |
|
376 | test-failure-unicode.t | |
377 | test-failure.t |
|
377 | test-failure.t | |
378 | test-success.t |
|
378 | test-success.t | |
379 |
|
379 | |||
380 | $ rt --list-tests --json |
|
380 | $ rt --list-tests --json | |
381 | test-failure-unicode.t |
|
381 | test-failure-unicode.t | |
382 | test-failure.t |
|
382 | test-failure.t | |
383 | test-success.t |
|
383 | test-success.t | |
384 | $ cat report.json |
|
384 | $ cat report.json | |
385 | testreport ={ |
|
385 | testreport ={ | |
386 | "test-failure-unicode.t": { |
|
386 | "test-failure-unicode.t": { | |
387 | "result": "success" |
|
387 | "result": "success" | |
388 | }, |
|
388 | }, | |
389 | "test-failure.t": { |
|
389 | "test-failure.t": { | |
390 | "result": "success" |
|
390 | "result": "success" | |
391 | }, |
|
391 | }, | |
392 | "test-success.t": { |
|
392 | "test-success.t": { | |
393 | "result": "success" |
|
393 | "result": "success" | |
394 | } |
|
394 | } | |
395 | } (no-eol) |
|
395 | } (no-eol) | |
396 |
|
396 | |||
397 | $ rt --list-tests --xunit=xunit.xml |
|
397 | $ rt --list-tests --xunit=xunit.xml | |
398 | test-failure-unicode.t |
|
398 | test-failure-unicode.t | |
399 | test-failure.t |
|
399 | test-failure.t | |
400 | test-success.t |
|
400 | test-success.t | |
401 | $ cat xunit.xml |
|
401 | $ cat xunit.xml | |
402 | <?xml version="1.0" encoding="utf-8"?> |
|
402 | <?xml version="1.0" encoding="utf-8"?> | |
403 | <testsuite errors="0" failures="0" name="run-tests" skipped="0" tests="0"> |
|
403 | <testsuite errors="0" failures="0" name="run-tests" skipped="0" tests="0"> | |
404 | <testcase name="test-failure-unicode.t"/> |
|
404 | <testcase name="test-failure-unicode.t"/> | |
405 | <testcase name="test-failure.t"/> |
|
405 | <testcase name="test-failure.t"/> | |
406 | <testcase name="test-success.t"/> |
|
406 | <testcase name="test-success.t"/> | |
407 | </testsuite> |
|
407 | </testsuite> | |
408 |
|
408 | |||
409 | $ rt --list-tests test-failure* --json --xunit=xunit.xml --outputdir output |
|
409 | $ rt --list-tests test-failure* --json --xunit=xunit.xml --outputdir output | |
410 | test-failure-unicode.t |
|
410 | test-failure-unicode.t | |
411 | test-failure.t |
|
411 | test-failure.t | |
412 | $ cat output/report.json |
|
412 | $ cat output/report.json | |
413 | testreport ={ |
|
413 | testreport ={ | |
414 | "test-failure-unicode.t": { |
|
414 | "test-failure-unicode.t": { | |
415 | "result": "success" |
|
415 | "result": "success" | |
416 | }, |
|
416 | }, | |
417 | "test-failure.t": { |
|
417 | "test-failure.t": { | |
418 | "result": "success" |
|
418 | "result": "success" | |
419 | } |
|
419 | } | |
420 | } (no-eol) |
|
420 | } (no-eol) | |
421 | $ cat xunit.xml |
|
421 | $ cat xunit.xml | |
422 | <?xml version="1.0" encoding="utf-8"?> |
|
422 | <?xml version="1.0" encoding="utf-8"?> | |
423 | <testsuite errors="0" failures="0" name="run-tests" skipped="0" tests="0"> |
|
423 | <testsuite errors="0" failures="0" name="run-tests" skipped="0" tests="0"> | |
424 | <testcase name="test-failure-unicode.t"/> |
|
424 | <testcase name="test-failure-unicode.t"/> | |
425 | <testcase name="test-failure.t"/> |
|
425 | <testcase name="test-failure.t"/> | |
426 | </testsuite> |
|
426 | </testsuite> | |
427 |
|
427 | |||
428 | $ rm test-failure-unicode.t |
|
428 | $ rm test-failure-unicode.t | |
429 |
|
429 | |||
430 | test for --retest |
|
430 | test for --retest | |
431 | ==================== |
|
431 | ==================== | |
432 |
|
432 | |||
433 | $ rt --retest |
|
433 | $ rt --retest | |
434 |
|
434 | |||
435 | --- $TESTTMP/test-failure.t |
|
435 | --- $TESTTMP/test-failure.t | |
436 | +++ $TESTTMP/test-failure.t.err |
|
436 | +++ $TESTTMP/test-failure.t.err | |
437 | @@ -1,5 +1,5 @@ |
|
437 | @@ -1,5 +1,5 @@ | |
438 | $ echo babar |
|
438 | $ echo babar | |
439 | - rataxes |
|
439 | - rataxes | |
440 | + babar |
|
440 | + babar | |
441 | This is a noop statement so that |
|
441 | This is a noop statement so that | |
442 | this test is still more bytes than success. |
|
442 | this test is still more bytes than success. | |
443 | pad pad pad pad............................................................ |
|
443 | pad pad pad pad............................................................ | |
444 |
|
444 | |||
445 | ERROR: test-failure.t output changed |
|
445 | ERROR: test-failure.t output changed | |
446 | ! |
|
446 | ! | |
447 | Failed test-failure.t: output changed |
|
447 | Failed test-failure.t: output changed | |
448 | # Ran 2 tests, 1 skipped, 1 failed. |
|
448 | # Ran 2 tests, 1 skipped, 1 failed. | |
449 | python hash seed: * (glob) |
|
449 | python hash seed: * (glob) | |
450 | [1] |
|
450 | [1] | |
451 |
|
451 | |||
452 | --retest works with --outputdir |
|
452 | --retest works with --outputdir | |
453 | $ rm -r output |
|
453 | $ rm -r output | |
454 | $ mkdir output |
|
454 | $ mkdir output | |
455 | $ mv test-failure.t.err output |
|
455 | $ mv test-failure.t.err output | |
456 | $ rt --retest --outputdir output |
|
456 | $ rt --retest --outputdir output | |
457 |
|
457 | |||
458 | --- $TESTTMP/test-failure.t |
|
458 | --- $TESTTMP/test-failure.t | |
459 | +++ $TESTTMP/output/test-failure.t.err |
|
459 | +++ $TESTTMP/output/test-failure.t.err | |
460 | @@ -1,5 +1,5 @@ |
|
460 | @@ -1,5 +1,5 @@ | |
461 | $ echo babar |
|
461 | $ echo babar | |
462 | - rataxes |
|
462 | - rataxes | |
463 | + babar |
|
463 | + babar | |
464 | This is a noop statement so that |
|
464 | This is a noop statement so that | |
465 | this test is still more bytes than success. |
|
465 | this test is still more bytes than success. | |
466 | pad pad pad pad............................................................ |
|
466 | pad pad pad pad............................................................ | |
467 |
|
467 | |||
468 | ERROR: test-failure.t output changed |
|
468 | ERROR: test-failure.t output changed | |
469 | ! |
|
469 | ! | |
470 | Failed test-failure.t: output changed |
|
470 | Failed test-failure.t: output changed | |
471 | # Ran 2 tests, 1 skipped, 1 failed. |
|
471 | # Ran 2 tests, 1 skipped, 1 failed. | |
472 | python hash seed: * (glob) |
|
472 | python hash seed: * (glob) | |
473 | [1] |
|
473 | [1] | |
474 |
|
474 | |||
475 | Selecting Tests To Run |
|
475 | Selecting Tests To Run | |
476 | ====================== |
|
476 | ====================== | |
477 |
|
477 | |||
478 | successful |
|
478 | successful | |
479 |
|
479 | |||
480 | $ rt test-success.t |
|
480 | $ rt test-success.t | |
481 | . |
|
481 | . | |
482 | # Ran 1 tests, 0 skipped, 0 failed. |
|
482 | # Ran 1 tests, 0 skipped, 0 failed. | |
483 |
|
483 | |||
484 | success w/ keyword |
|
484 | success w/ keyword | |
485 | $ rt -k xyzzy |
|
485 | $ rt -k xyzzy | |
486 | . |
|
486 | . | |
487 | # Ran 2 tests, 1 skipped, 0 failed. |
|
487 | # Ran 2 tests, 1 skipped, 0 failed. | |
488 |
|
488 | |||
489 | failed |
|
489 | failed | |
490 |
|
490 | |||
491 | $ rt test-failure.t |
|
491 | $ rt test-failure.t | |
492 |
|
492 | |||
493 | --- $TESTTMP/test-failure.t |
|
493 | --- $TESTTMP/test-failure.t | |
494 | +++ $TESTTMP/test-failure.t.err |
|
494 | +++ $TESTTMP/test-failure.t.err | |
495 | @@ -1,5 +1,5 @@ |
|
495 | @@ -1,5 +1,5 @@ | |
496 | $ echo babar |
|
496 | $ echo babar | |
497 | - rataxes |
|
497 | - rataxes | |
498 | + babar |
|
498 | + babar | |
499 | This is a noop statement so that |
|
499 | This is a noop statement so that | |
500 | this test is still more bytes than success. |
|
500 | this test is still more bytes than success. | |
501 | pad pad pad pad............................................................ |
|
501 | pad pad pad pad............................................................ | |
502 |
|
502 | |||
503 | ERROR: test-failure.t output changed |
|
503 | ERROR: test-failure.t output changed | |
504 | ! |
|
504 | ! | |
505 | Failed test-failure.t: output changed |
|
505 | Failed test-failure.t: output changed | |
506 | # Ran 1 tests, 0 skipped, 1 failed. |
|
506 | # Ran 1 tests, 0 skipped, 1 failed. | |
507 | python hash seed: * (glob) |
|
507 | python hash seed: * (glob) | |
508 | [1] |
|
508 | [1] | |
509 |
|
509 | |||
510 | failure w/ keyword |
|
510 | failure w/ keyword | |
511 | $ rt -k rataxes |
|
511 | $ rt -k rataxes | |
512 |
|
512 | |||
513 | --- $TESTTMP/test-failure.t |
|
513 | --- $TESTTMP/test-failure.t | |
514 | +++ $TESTTMP/test-failure.t.err |
|
514 | +++ $TESTTMP/test-failure.t.err | |
515 | @@ -1,5 +1,5 @@ |
|
515 | @@ -1,5 +1,5 @@ | |
516 | $ echo babar |
|
516 | $ echo babar | |
517 | - rataxes |
|
517 | - rataxes | |
518 | + babar |
|
518 | + babar | |
519 | This is a noop statement so that |
|
519 | This is a noop statement so that | |
520 | this test is still more bytes than success. |
|
520 | this test is still more bytes than success. | |
521 | pad pad pad pad............................................................ |
|
521 | pad pad pad pad............................................................ | |
522 |
|
522 | |||
523 | ERROR: test-failure.t output changed |
|
523 | ERROR: test-failure.t output changed | |
524 | ! |
|
524 | ! | |
525 | Failed test-failure.t: output changed |
|
525 | Failed test-failure.t: output changed | |
526 | # Ran 2 tests, 1 skipped, 1 failed. |
|
526 | # Ran 2 tests, 1 skipped, 1 failed. | |
527 | python hash seed: * (glob) |
|
527 | python hash seed: * (glob) | |
528 | [1] |
|
528 | [1] | |
529 |
|
529 | |||
530 | Verify that when a process fails to start we show a useful message |
|
530 | Verify that when a process fails to start we show a useful message | |
531 | ================================================================== |
|
531 | ================================================================== | |
532 |
|
532 | |||
533 | $ cat > test-serve-fail.t <<EOF |
|
533 | $ cat > test-serve-fail.t <<EOF | |
534 | > $ echo 'abort: child process failed to start blah' |
|
534 | > $ echo 'abort: child process failed to start blah' | |
535 | > EOF |
|
535 | > EOF | |
536 | $ rt test-serve-fail.t |
|
536 | $ rt test-serve-fail.t | |
537 |
|
537 | |||
538 | ERROR: test-serve-fail.t output changed |
|
538 | ERROR: test-serve-fail.t output changed | |
539 | ! |
|
539 | ! | |
540 | Failed test-serve-fail.t: server failed to start (HGPORT=*) (glob) |
|
540 | Failed test-serve-fail.t: server failed to start (HGPORT=*) (glob) | |
541 | # Ran 1 tests, 0 skipped, 1 failed. |
|
541 | # Ran 1 tests, 0 skipped, 1 failed. | |
542 | python hash seed: * (glob) |
|
542 | python hash seed: * (glob) | |
543 | [1] |
|
543 | [1] | |
544 | $ rm test-serve-fail.t |
|
544 | $ rm test-serve-fail.t | |
545 |
|
545 | |||
546 | Verify that we can try other ports |
|
546 | Verify that we can try other ports | |
547 | =================================== |
|
547 | =================================== | |
548 | $ hg init inuse |
|
548 | $ hg init inuse | |
549 | $ hg serve -R inuse -p $HGPORT -d --pid-file=blocks.pid |
|
549 | $ hg serve -R inuse -p $HGPORT -d --pid-file=blocks.pid | |
550 | $ cat blocks.pid >> $DAEMON_PIDS |
|
550 | $ cat blocks.pid >> $DAEMON_PIDS | |
551 | $ cat > test-serve-inuse.t <<EOF |
|
551 | $ cat > test-serve-inuse.t <<EOF | |
552 | > $ hg serve -R `pwd`/inuse -p \$HGPORT -d --pid-file=hg.pid |
|
552 | > $ hg serve -R `pwd`/inuse -p \$HGPORT -d --pid-file=hg.pid | |
553 | > $ cat hg.pid >> \$DAEMON_PIDS |
|
553 | > $ cat hg.pid >> \$DAEMON_PIDS | |
554 | > EOF |
|
554 | > EOF | |
555 | $ rt test-serve-inuse.t |
|
555 | $ rt test-serve-inuse.t | |
556 | . |
|
556 | . | |
557 | # Ran 1 tests, 0 skipped, 0 failed. |
|
557 | # Ran 1 tests, 0 skipped, 0 failed. | |
558 | $ rm test-serve-inuse.t |
|
558 | $ rm test-serve-inuse.t | |
559 | $ killdaemons.py $DAEMON_PIDS |
|
559 | $ killdaemons.py $DAEMON_PIDS | |
560 | $ rm $DAEMON_PIDS |
|
560 | $ rm $DAEMON_PIDS | |
561 |
|
561 | |||
562 | Running In Debug Mode |
|
562 | Running In Debug Mode | |
563 | ====================== |
|
563 | ====================== | |
564 |
|
564 | |||
565 | $ rt --debug 2>&1 | grep -v pwd |
|
565 | $ rt --debug 2>&1 | grep -v pwd | |
566 | + echo *SALT* 0 0 (glob) |
|
566 | + echo *SALT* 0 0 (glob) | |
567 | *SALT* 0 0 (glob) |
|
567 | *SALT* 0 0 (glob) | |
568 | + echo babar |
|
568 | + echo babar | |
569 | babar |
|
569 | babar | |
570 | + echo *SALT* 10 0 (glob) |
|
570 | + echo *SALT* 10 0 (glob) | |
571 | *SALT* 10 0 (glob) |
|
571 | *SALT* 10 0 (glob) | |
572 | *+ echo *SALT* 0 0 (glob) |
|
572 | *+ echo *SALT* 0 0 (glob) | |
573 | *SALT* 0 0 (glob) |
|
573 | *SALT* 0 0 (glob) | |
574 | + echo babar |
|
574 | + echo babar | |
575 | babar |
|
575 | babar | |
576 | + echo *SALT* 2 0 (glob) |
|
576 | + echo *SALT* 2 0 (glob) | |
577 | *SALT* 2 0 (glob) |
|
577 | *SALT* 2 0 (glob) | |
578 | + echo xyzzy |
|
578 | + echo xyzzy | |
579 | xyzzy |
|
579 | xyzzy | |
580 | + echo *SALT* 9 0 (glob) |
|
580 | + echo *SALT* 9 0 (glob) | |
581 | *SALT* 9 0 (glob) |
|
581 | *SALT* 9 0 (glob) | |
582 | + printf *abc\ndef\nxyz\n* (glob) |
|
582 | + printf *abc\ndef\nxyz\n* (glob) | |
583 | abc |
|
583 | abc | |
584 | def |
|
584 | def | |
585 | xyz |
|
585 | xyz | |
586 | + echo *SALT* 15 0 (glob) |
|
586 | + echo *SALT* 15 0 (glob) | |
587 | *SALT* 15 0 (glob) |
|
587 | *SALT* 15 0 (glob) | |
588 | + printf *zyx\nwvu\ntsr\n* (glob) |
|
588 | + printf *zyx\nwvu\ntsr\n* (glob) | |
589 | zyx |
|
589 | zyx | |
590 | wvu |
|
590 | wvu | |
591 | tsr |
|
591 | tsr | |
592 | + echo *SALT* 22 0 (glob) |
|
592 | + echo *SALT* 22 0 (glob) | |
593 | *SALT* 22 0 (glob) |
|
593 | *SALT* 22 0 (glob) | |
594 | . |
|
594 | . | |
595 | # Ran 2 tests, 0 skipped, 0 failed. |
|
595 | # Ran 2 tests, 0 skipped, 0 failed. | |
596 |
|
596 | |||
597 | Parallel runs |
|
597 | Parallel runs | |
598 | ============== |
|
598 | ============== | |
599 |
|
599 | |||
600 | (duplicate the failing test to get predictable output) |
|
600 | (duplicate the failing test to get predictable output) | |
601 | $ cp test-failure.t test-failure-copy.t |
|
601 | $ cp test-failure.t test-failure-copy.t | |
602 |
|
602 | |||
603 | $ rt --jobs 2 test-failure*.t -n |
|
603 | $ rt --jobs 2 test-failure*.t -n | |
604 | !! |
|
604 | !! | |
605 | Failed test-failure*.t: output changed (glob) |
|
605 | Failed test-failure*.t: output changed (glob) | |
606 | Failed test-failure*.t: output changed (glob) |
|
606 | Failed test-failure*.t: output changed (glob) | |
607 | # Ran 2 tests, 0 skipped, 2 failed. |
|
607 | # Ran 2 tests, 0 skipped, 2 failed. | |
608 | python hash seed: * (glob) |
|
608 | python hash seed: * (glob) | |
609 | [1] |
|
609 | [1] | |
610 |
|
610 | |||
611 | failures in parallel with --first should only print one failure |
|
611 | failures in parallel with --first should only print one failure | |
612 | >>> f = open('test-nothing.t', 'w') |
|
612 | $ rt --jobs 2 --first test-failure*.t | |
613 | >>> f.write('foo\n' * 1024) and None |
|
|||
614 | >>> f.write(' $ sleep 1') and None |
|
|||
615 | $ rt --jobs 2 --first |
|
|||
616 |
|
613 | |||
617 |
--- $ |
|
614 | --- $TESTTMP/test-failure*.t (glob) | |
618 |
+++ $ |
|
615 | +++ $TESTTMP/test-failure*.t.err (glob) | |
619 | @@ -1,5 +1,5 @@ |
|
616 | @@ -1,5 +1,5 @@ | |
620 |
$ |
|
617 | $ echo babar | |
621 | - rataxes |
|
618 | - rataxes | |
622 | + babar |
|
619 | + babar | |
623 | This is a noop statement so that |
|
620 | This is a noop statement so that | |
624 | this test is still more bytes than success. |
|
621 | this test is still more bytes than success. | |
625 | pad pad pad pad............................................................ |
|
622 | pad pad pad pad............................................................ | |
626 |
|
623 | |||
627 | Failed test-failure*.t: output changed (glob) |
|
624 | Failed test-failure*.t: output changed (glob) | |
628 |
Failed test- |
|
625 | Failed test-failure*.t: output changed (glob) | |
629 | # Ran 2 tests, 0 skipped, 2 failed. |
|
626 | # Ran 2 tests, 0 skipped, 2 failed. | |
630 | python hash seed: * (glob) |
|
627 | python hash seed: * (glob) | |
631 | [1] |
|
628 | [1] | |
632 |
|
629 | |||
633 |
|
630 | |||
634 | (delete the duplicated test file) |
|
631 | (delete the duplicated test file) | |
635 |
$ rm test-failure-copy.t |
|
632 | $ rm test-failure-copy.t | |
636 |
|
633 | |||
637 |
|
634 | |||
638 | Interactive run |
|
635 | Interactive run | |
639 | =============== |
|
636 | =============== | |
640 |
|
637 | |||
641 | (backup the failing test) |
|
638 | (backup the failing test) | |
642 | $ cp test-failure.t backup |
|
639 | $ cp test-failure.t backup | |
643 |
|
640 | |||
644 | Refuse the fix |
|
641 | Refuse the fix | |
645 |
|
642 | |||
646 | $ echo 'n' | rt -i |
|
643 | $ echo 'n' | rt -i | |
647 |
|
644 | |||
648 | --- $TESTTMP/test-failure.t |
|
645 | --- $TESTTMP/test-failure.t | |
649 | +++ $TESTTMP/test-failure.t.err |
|
646 | +++ $TESTTMP/test-failure.t.err | |
650 | @@ -1,5 +1,5 @@ |
|
647 | @@ -1,5 +1,5 @@ | |
651 | $ echo babar |
|
648 | $ echo babar | |
652 | - rataxes |
|
649 | - rataxes | |
653 | + babar |
|
650 | + babar | |
654 | This is a noop statement so that |
|
651 | This is a noop statement so that | |
655 | this test is still more bytes than success. |
|
652 | this test is still more bytes than success. | |
656 | pad pad pad pad............................................................ |
|
653 | pad pad pad pad............................................................ | |
657 | Accept this change? [n] |
|
654 | Accept this change? [n] | |
658 | ERROR: test-failure.t output changed |
|
655 | ERROR: test-failure.t output changed | |
659 | !. |
|
656 | !. | |
660 | Failed test-failure.t: output changed |
|
657 | Failed test-failure.t: output changed | |
661 | # Ran 2 tests, 0 skipped, 1 failed. |
|
658 | # Ran 2 tests, 0 skipped, 1 failed. | |
662 | python hash seed: * (glob) |
|
659 | python hash seed: * (glob) | |
663 | [1] |
|
660 | [1] | |
664 |
|
661 | |||
665 | $ cat test-failure.t |
|
662 | $ cat test-failure.t | |
666 | $ echo babar |
|
663 | $ echo babar | |
667 | rataxes |
|
664 | rataxes | |
668 | This is a noop statement so that |
|
665 | This is a noop statement so that | |
669 | this test is still more bytes than success. |
|
666 | this test is still more bytes than success. | |
670 | pad pad pad pad............................................................ |
|
667 | pad pad pad pad............................................................ | |
671 | pad pad pad pad............................................................ |
|
668 | pad pad pad pad............................................................ | |
672 | pad pad pad pad............................................................ |
|
669 | pad pad pad pad............................................................ | |
673 | pad pad pad pad............................................................ |
|
670 | pad pad pad pad............................................................ | |
674 | pad pad pad pad............................................................ |
|
671 | pad pad pad pad............................................................ | |
675 | pad pad pad pad............................................................ |
|
672 | pad pad pad pad............................................................ | |
676 |
|
673 | |||
677 | Interactive with custom view |
|
674 | Interactive with custom view | |
678 |
|
675 | |||
679 | $ echo 'n' | rt -i --view echo |
|
676 | $ echo 'n' | rt -i --view echo | |
680 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) |
|
677 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) | |
681 | Accept this change? [n]* (glob) |
|
678 | Accept this change? [n]* (glob) | |
682 | ERROR: test-failure.t output changed |
|
679 | ERROR: test-failure.t output changed | |
683 | !. |
|
680 | !. | |
684 | Failed test-failure.t: output changed |
|
681 | Failed test-failure.t: output changed | |
685 | # Ran 2 tests, 0 skipped, 1 failed. |
|
682 | # Ran 2 tests, 0 skipped, 1 failed. | |
686 | python hash seed: * (glob) |
|
683 | python hash seed: * (glob) | |
687 | [1] |
|
684 | [1] | |
688 |
|
685 | |||
689 | View the fix |
|
686 | View the fix | |
690 |
|
687 | |||
691 | $ echo 'y' | rt --view echo |
|
688 | $ echo 'y' | rt --view echo | |
692 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) |
|
689 | $TESTTMP/test-failure.t $TESTTMP/test-failure.t.err (glob) | |
693 |
|
690 | |||
694 | ERROR: test-failure.t output changed |
|
691 | ERROR: test-failure.t output changed | |
695 | !. |
|
692 | !. | |
696 | Failed test-failure.t: output changed |
|
693 | Failed test-failure.t: output changed | |
697 | # Ran 2 tests, 0 skipped, 1 failed. |
|
694 | # Ran 2 tests, 0 skipped, 1 failed. | |
698 | python hash seed: * (glob) |
|
695 | python hash seed: * (glob) | |
699 | [1] |
|
696 | [1] | |
700 |
|
697 | |||
701 | Accept the fix |
|
698 | Accept the fix | |
702 |
|
699 | |||
703 | $ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t |
|
700 | $ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t | |
704 | $ echo " saved backup bundle to \$TESTTMP/foo.hg" >> test-failure.t |
|
701 | $ echo " saved backup bundle to \$TESTTMP/foo.hg" >> test-failure.t | |
705 | $ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t |
|
702 | $ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t | |
706 | $ echo " saved backup bundle to \$TESTTMP/foo.hg (glob)" >> test-failure.t |
|
703 | $ echo " saved backup bundle to \$TESTTMP/foo.hg (glob)" >> test-failure.t | |
707 | $ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t |
|
704 | $ echo " $ echo 'saved backup bundle to \$TESTTMP/foo.hg'" >> test-failure.t | |
708 | $ echo " saved backup bundle to \$TESTTMP/*.hg (glob)" >> test-failure.t |
|
705 | $ echo " saved backup bundle to \$TESTTMP/*.hg (glob)" >> test-failure.t | |
709 | $ echo 'y' | rt -i 2>&1 |
|
706 | $ echo 'y' | rt -i 2>&1 | |
710 |
|
707 | |||
711 | --- $TESTTMP/test-failure.t |
|
708 | --- $TESTTMP/test-failure.t | |
712 | +++ $TESTTMP/test-failure.t.err |
|
709 | +++ $TESTTMP/test-failure.t.err | |
713 | @@ -1,5 +1,5 @@ |
|
710 | @@ -1,5 +1,5 @@ | |
714 | $ echo babar |
|
711 | $ echo babar | |
715 | - rataxes |
|
712 | - rataxes | |
716 | + babar |
|
713 | + babar | |
717 | This is a noop statement so that |
|
714 | This is a noop statement so that | |
718 | this test is still more bytes than success. |
|
715 | this test is still more bytes than success. | |
719 | pad pad pad pad............................................................ |
|
716 | pad pad pad pad............................................................ | |
720 | @@ -9,7 +9,7 @@ |
|
717 | @@ -9,7 +9,7 @@ | |
721 | pad pad pad pad............................................................ |
|
718 | pad pad pad pad............................................................ | |
722 | pad pad pad pad............................................................ |
|
719 | pad pad pad pad............................................................ | |
723 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
|
720 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' | |
724 | - saved backup bundle to $TESTTMP/foo.hg |
|
721 | - saved backup bundle to $TESTTMP/foo.hg | |
725 | + saved backup bundle to $TESTTMP/foo.hg* (glob) |
|
722 | + saved backup bundle to $TESTTMP/foo.hg* (glob) | |
726 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
|
723 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' | |
727 | saved backup bundle to $TESTTMP/foo.hg* (glob) |
|
724 | saved backup bundle to $TESTTMP/foo.hg* (glob) | |
728 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
|
725 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' | |
729 | Accept this change? [n] .. |
|
726 | Accept this change? [n] .. | |
730 | # Ran 2 tests, 0 skipped, 0 failed. |
|
727 | # Ran 2 tests, 0 skipped, 0 failed. | |
731 |
|
728 | |||
732 | $ sed -e 's,(glob)$,&<,g' test-failure.t |
|
729 | $ sed -e 's,(glob)$,&<,g' test-failure.t | |
733 | $ echo babar |
|
730 | $ echo babar | |
734 | babar |
|
731 | babar | |
735 | This is a noop statement so that |
|
732 | This is a noop statement so that | |
736 | this test is still more bytes than success. |
|
733 | this test is still more bytes than success. | |
737 | pad pad pad pad............................................................ |
|
734 | pad pad pad pad............................................................ | |
738 | pad pad pad pad............................................................ |
|
735 | pad pad pad pad............................................................ | |
739 | pad pad pad pad............................................................ |
|
736 | pad pad pad pad............................................................ | |
740 | pad pad pad pad............................................................ |
|
737 | pad pad pad pad............................................................ | |
741 | pad pad pad pad............................................................ |
|
738 | pad pad pad pad............................................................ | |
742 | pad pad pad pad............................................................ |
|
739 | pad pad pad pad............................................................ | |
743 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
|
740 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' | |
744 | saved backup bundle to $TESTTMP/foo.hg (glob)< |
|
741 | saved backup bundle to $TESTTMP/foo.hg (glob)< | |
745 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
|
742 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' | |
746 | saved backup bundle to $TESTTMP/foo.hg (glob)< |
|
743 | saved backup bundle to $TESTTMP/foo.hg (glob)< | |
747 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' |
|
744 | $ echo 'saved backup bundle to $TESTTMP/foo.hg' | |
748 | saved backup bundle to $TESTTMP/*.hg (glob)< |
|
745 | saved backup bundle to $TESTTMP/*.hg (glob)< | |
749 |
|
746 | |||
750 | Race condition - test file was modified when test is running |
|
747 | Race condition - test file was modified when test is running | |
751 |
|
748 | |||
752 | $ TESTRACEDIR=`pwd` |
|
749 | $ TESTRACEDIR=`pwd` | |
753 | $ export TESTRACEDIR |
|
750 | $ export TESTRACEDIR | |
754 | $ cat > test-race.t <<EOF |
|
751 | $ cat > test-race.t <<EOF | |
755 | > $ echo 1 |
|
752 | > $ echo 1 | |
756 | > $ echo "# a new line" >> $TESTRACEDIR/test-race.t |
|
753 | > $ echo "# a new line" >> $TESTRACEDIR/test-race.t | |
757 | > EOF |
|
754 | > EOF | |
758 |
|
755 | |||
759 | $ rt -i test-race.t |
|
756 | $ rt -i test-race.t | |
760 |
|
757 | |||
761 | --- $TESTTMP/test-race.t |
|
758 | --- $TESTTMP/test-race.t | |
762 | +++ $TESTTMP/test-race.t.err |
|
759 | +++ $TESTTMP/test-race.t.err | |
763 | @@ -1,2 +1,3 @@ |
|
760 | @@ -1,2 +1,3 @@ | |
764 | $ echo 1 |
|
761 | $ echo 1 | |
765 | + 1 |
|
762 | + 1 | |
766 | $ echo "# a new line" >> $TESTTMP/test-race.t |
|
763 | $ echo "# a new line" >> $TESTTMP/test-race.t | |
767 | Reference output has changed (run again to prompt changes) |
|
764 | Reference output has changed (run again to prompt changes) | |
768 | ERROR: test-race.t output changed |
|
765 | ERROR: test-race.t output changed | |
769 | ! |
|
766 | ! | |
770 | Failed test-race.t: output changed |
|
767 | Failed test-race.t: output changed | |
771 | # Ran 1 tests, 0 skipped, 1 failed. |
|
768 | # Ran 1 tests, 0 skipped, 1 failed. | |
772 | python hash seed: * (glob) |
|
769 | python hash seed: * (glob) | |
773 | [1] |
|
770 | [1] | |
774 |
|
771 | |||
775 | $ rm test-race.t |
|
772 | $ rm test-race.t | |
776 |
|
773 | |||
777 | When "#testcases" is used in .t files |
|
774 | When "#testcases" is used in .t files | |
778 |
|
775 | |||
779 | $ cat >> test-cases.t <<EOF |
|
776 | $ cat >> test-cases.t <<EOF | |
780 | > #testcases a b |
|
777 | > #testcases a b | |
781 | > #if a |
|
778 | > #if a | |
782 | > $ echo 1 |
|
779 | > $ echo 1 | |
783 | > #endif |
|
780 | > #endif | |
784 | > #if b |
|
781 | > #if b | |
785 | > $ echo 2 |
|
782 | > $ echo 2 | |
786 | > #endif |
|
783 | > #endif | |
787 | > EOF |
|
784 | > EOF | |
788 |
|
785 | |||
789 | $ cat <<EOF | rt -i test-cases.t 2>&1 |
|
786 | $ cat <<EOF | rt -i test-cases.t 2>&1 | |
790 | > y |
|
787 | > y | |
791 | > y |
|
788 | > y | |
792 | > EOF |
|
789 | > EOF | |
793 |
|
790 | |||
794 | --- $TESTTMP/test-cases.t |
|
791 | --- $TESTTMP/test-cases.t | |
795 | +++ $TESTTMP/test-cases.t.a.err |
|
792 | +++ $TESTTMP/test-cases.t.a.err | |
796 | @@ -1,6 +1,7 @@ |
|
793 | @@ -1,6 +1,7 @@ | |
797 | #testcases a b |
|
794 | #testcases a b | |
798 | #if a |
|
795 | #if a | |
799 | $ echo 1 |
|
796 | $ echo 1 | |
800 | + 1 |
|
797 | + 1 | |
801 | #endif |
|
798 | #endif | |
802 | #if b |
|
799 | #if b | |
803 | $ echo 2 |
|
800 | $ echo 2 | |
804 | Accept this change? [n] . |
|
801 | Accept this change? [n] . | |
805 | --- $TESTTMP/test-cases.t |
|
802 | --- $TESTTMP/test-cases.t | |
806 | +++ $TESTTMP/test-cases.t.b.err |
|
803 | +++ $TESTTMP/test-cases.t.b.err | |
807 | @@ -5,4 +5,5 @@ |
|
804 | @@ -5,4 +5,5 @@ | |
808 | #endif |
|
805 | #endif | |
809 | #if b |
|
806 | #if b | |
810 | $ echo 2 |
|
807 | $ echo 2 | |
811 | + 2 |
|
808 | + 2 | |
812 | #endif |
|
809 | #endif | |
813 | Accept this change? [n] . |
|
810 | Accept this change? [n] . | |
814 | # Ran 2 tests, 0 skipped, 0 failed. |
|
811 | # Ran 2 tests, 0 skipped, 0 failed. | |
815 |
|
812 | |||
816 | $ cat test-cases.t |
|
813 | $ cat test-cases.t | |
817 | #testcases a b |
|
814 | #testcases a b | |
818 | #if a |
|
815 | #if a | |
819 | $ echo 1 |
|
816 | $ echo 1 | |
820 | 1 |
|
817 | 1 | |
821 | #endif |
|
818 | #endif | |
822 | #if b |
|
819 | #if b | |
823 | $ echo 2 |
|
820 | $ echo 2 | |
824 | 2 |
|
821 | 2 | |
825 | #endif |
|
822 | #endif | |
826 |
|
823 | |||
827 | $ cat >> test-cases.t <<'EOF' |
|
824 | $ cat >> test-cases.t <<'EOF' | |
828 | > #if a |
|
825 | > #if a | |
829 | > $ NAME=A |
|
826 | > $ NAME=A | |
830 | > #else |
|
827 | > #else | |
831 | > $ NAME=B |
|
828 | > $ NAME=B | |
832 | > #endif |
|
829 | > #endif | |
833 | > $ echo $NAME |
|
830 | > $ echo $NAME | |
834 | > A (a !) |
|
831 | > A (a !) | |
835 | > B (b !) |
|
832 | > B (b !) | |
836 | > EOF |
|
833 | > EOF | |
837 | $ rt test-cases.t |
|
834 | $ rt test-cases.t | |
838 | .. |
|
835 | .. | |
839 | # Ran 2 tests, 0 skipped, 0 failed. |
|
836 | # Ran 2 tests, 0 skipped, 0 failed. | |
840 |
|
837 | |||
841 | $ rm test-cases.t |
|
838 | $ rm test-cases.t | |
842 |
|
839 | |||
843 | (reinstall) |
|
840 | (reinstall) | |
844 | $ mv backup test-failure.t |
|
841 | $ mv backup test-failure.t | |
845 |
|
842 | |||
846 | No Diff |
|
843 | No Diff | |
847 | =============== |
|
844 | =============== | |
848 |
|
845 | |||
849 | $ rt --nodiff |
|
846 | $ rt --nodiff | |
850 | !. |
|
847 | !. | |
851 | Failed test-failure.t: output changed |
|
848 | Failed test-failure.t: output changed | |
852 | # Ran 2 tests, 0 skipped, 1 failed. |
|
849 | # Ran 2 tests, 0 skipped, 1 failed. | |
853 | python hash seed: * (glob) |
|
850 | python hash seed: * (glob) | |
854 | [1] |
|
851 | [1] | |
855 |
|
852 | |||
856 | test --tmpdir support |
|
853 | test --tmpdir support | |
857 | $ rt --tmpdir=$TESTTMP/keep test-success.t |
|
854 | $ rt --tmpdir=$TESTTMP/keep test-success.t | |
858 |
|
855 | |||
859 | Keeping testtmp dir: $TESTTMP/keep/child1/test-success.t (glob) |
|
856 | Keeping testtmp dir: $TESTTMP/keep/child1/test-success.t (glob) | |
860 | Keeping threadtmp dir: $TESTTMP/keep/child1 (glob) |
|
857 | Keeping threadtmp dir: $TESTTMP/keep/child1 (glob) | |
861 | . |
|
858 | . | |
862 | # Ran 1 tests, 0 skipped, 0 failed. |
|
859 | # Ran 1 tests, 0 skipped, 0 failed. | |
863 |
|
860 | |||
864 | timeouts |
|
861 | timeouts | |
865 | ======== |
|
862 | ======== | |
866 | $ cat > test-timeout.t <<EOF |
|
863 | $ cat > test-timeout.t <<EOF | |
867 | > $ sleep 2 |
|
864 | > $ sleep 2 | |
868 | > $ echo pass |
|
865 | > $ echo pass | |
869 | > pass |
|
866 | > pass | |
870 | > EOF |
|
867 | > EOF | |
871 | > echo '#require slow' > test-slow-timeout.t |
|
868 | > echo '#require slow' > test-slow-timeout.t | |
872 | > cat test-timeout.t >> test-slow-timeout.t |
|
869 | > cat test-timeout.t >> test-slow-timeout.t | |
873 | $ rt --timeout=1 --slowtimeout=3 test-timeout.t test-slow-timeout.t |
|
870 | $ rt --timeout=1 --slowtimeout=3 test-timeout.t test-slow-timeout.t | |
874 | st |
|
871 | st | |
875 | Skipped test-slow-timeout.t: missing feature: allow slow tests (use --allow-slow-tests) |
|
872 | Skipped test-slow-timeout.t: missing feature: allow slow tests (use --allow-slow-tests) | |
876 | Failed test-timeout.t: timed out |
|
873 | Failed test-timeout.t: timed out | |
877 | # Ran 1 tests, 1 skipped, 1 failed. |
|
874 | # Ran 1 tests, 1 skipped, 1 failed. | |
878 | python hash seed: * (glob) |
|
875 | python hash seed: * (glob) | |
879 | [1] |
|
876 | [1] | |
880 | $ rt --timeout=1 --slowtimeout=3 \ |
|
877 | $ rt --timeout=1 --slowtimeout=3 \ | |
881 | > test-timeout.t test-slow-timeout.t --allow-slow-tests |
|
878 | > test-timeout.t test-slow-timeout.t --allow-slow-tests | |
882 | .t |
|
879 | .t | |
883 | Failed test-timeout.t: timed out |
|
880 | Failed test-timeout.t: timed out | |
884 | # Ran 2 tests, 0 skipped, 1 failed. |
|
881 | # Ran 2 tests, 0 skipped, 1 failed. | |
885 | python hash seed: * (glob) |
|
882 | python hash seed: * (glob) | |
886 | [1] |
|
883 | [1] | |
887 | $ rm test-timeout.t test-slow-timeout.t |
|
884 | $ rm test-timeout.t test-slow-timeout.t | |
888 |
|
885 | |||
889 | test for --time |
|
886 | test for --time | |
890 | ================== |
|
887 | ================== | |
891 |
|
888 | |||
892 | $ rt test-success.t --time |
|
889 | $ rt test-success.t --time | |
893 | . |
|
890 | . | |
894 | # Ran 1 tests, 0 skipped, 0 failed. |
|
891 | # Ran 1 tests, 0 skipped, 0 failed. | |
895 | # Producing time report |
|
892 | # Producing time report | |
896 | start end cuser csys real Test |
|
893 | start end cuser csys real Test | |
897 | \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) |
|
894 | \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) | |
898 |
|
895 | |||
899 | test for --time with --job enabled |
|
896 | test for --time with --job enabled | |
900 | ==================================== |
|
897 | ==================================== | |
901 |
|
898 | |||
902 | $ rt test-success.t --time --jobs 2 |
|
899 | $ rt test-success.t --time --jobs 2 | |
903 | . |
|
900 | . | |
904 | # Ran 1 tests, 0 skipped, 0 failed. |
|
901 | # Ran 1 tests, 0 skipped, 0 failed. | |
905 | # Producing time report |
|
902 | # Producing time report | |
906 | start end cuser csys real Test |
|
903 | start end cuser csys real Test | |
907 | \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) |
|
904 | \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} \s*[\d\.]{5} test-success.t (re) | |
908 |
|
905 | |||
909 | Skips |
|
906 | Skips | |
910 | ================ |
|
907 | ================ | |
911 | $ cat > test-skip.t <<EOF |
|
908 | $ cat > test-skip.t <<EOF | |
912 | > $ echo xyzzy |
|
909 | > $ echo xyzzy | |
913 | > #require false |
|
910 | > #require false | |
914 | > EOF |
|
911 | > EOF | |
915 | $ rt --nodiff |
|
912 | $ rt --nodiff | |
916 | !.s |
|
913 | !.s | |
917 | Skipped test-skip.t: missing feature: nail clipper |
|
914 | Skipped test-skip.t: missing feature: nail clipper | |
918 | Failed test-failure.t: output changed |
|
915 | Failed test-failure.t: output changed | |
919 | # Ran 2 tests, 1 skipped, 1 failed. |
|
916 | # Ran 2 tests, 1 skipped, 1 failed. | |
920 | python hash seed: * (glob) |
|
917 | python hash seed: * (glob) | |
921 | [1] |
|
918 | [1] | |
922 |
|
919 | |||
923 | $ rt --keyword xyzzy |
|
920 | $ rt --keyword xyzzy | |
924 | .s |
|
921 | .s | |
925 | Skipped test-skip.t: missing feature: nail clipper |
|
922 | Skipped test-skip.t: missing feature: nail clipper | |
926 | # Ran 2 tests, 2 skipped, 0 failed. |
|
923 | # Ran 2 tests, 2 skipped, 0 failed. | |
927 |
|
924 | |||
928 | Skips with xml |
|
925 | Skips with xml | |
929 | $ rt --keyword xyzzy \ |
|
926 | $ rt --keyword xyzzy \ | |
930 | > --xunit=xunit.xml |
|
927 | > --xunit=xunit.xml | |
931 | .s |
|
928 | .s | |
932 | Skipped test-skip.t: missing feature: nail clipper |
|
929 | Skipped test-skip.t: missing feature: nail clipper | |
933 | # Ran 2 tests, 2 skipped, 0 failed. |
|
930 | # Ran 2 tests, 2 skipped, 0 failed. | |
934 | $ cat xunit.xml |
|
931 | $ cat xunit.xml | |
935 | <?xml version="1.0" encoding="utf-8"?> |
|
932 | <?xml version="1.0" encoding="utf-8"?> | |
936 | <testsuite errors="0" failures="0" name="run-tests" skipped="2" tests="2"> |
|
933 | <testsuite errors="0" failures="0" name="run-tests" skipped="2" tests="2"> | |
937 | <testcase name="test-success.t" time="*"/> (glob) |
|
934 | <testcase name="test-success.t" time="*"/> (glob) | |
938 | <testcase name="test-skip.t"> |
|
935 | <testcase name="test-skip.t"> | |
939 | <skipped> |
|
936 | <skipped> | |
940 | <![CDATA[missing feature: nail clipper]]> </skipped> |
|
937 | <![CDATA[missing feature: nail clipper]]> </skipped> | |
941 | </testcase> |
|
938 | </testcase> | |
942 | </testsuite> |
|
939 | </testsuite> | |
943 |
|
940 | |||
944 | Missing skips or blacklisted skips don't count as executed: |
|
941 | Missing skips or blacklisted skips don't count as executed: | |
945 | $ echo test-failure.t > blacklist |
|
942 | $ echo test-failure.t > blacklist | |
946 | $ rt --blacklist=blacklist --json\ |
|
943 | $ rt --blacklist=blacklist --json\ | |
947 | > test-failure.t test-bogus.t |
|
944 | > test-failure.t test-bogus.t | |
948 | ss |
|
945 | ss | |
949 | Skipped test-bogus.t: Doesn't exist |
|
946 | Skipped test-bogus.t: Doesn't exist | |
950 | Skipped test-failure.t: blacklisted |
|
947 | Skipped test-failure.t: blacklisted | |
951 | # Ran 0 tests, 2 skipped, 0 failed. |
|
948 | # Ran 0 tests, 2 skipped, 0 failed. | |
952 | $ cat report.json |
|
949 | $ cat report.json | |
953 | testreport ={ |
|
950 | testreport ={ | |
954 | "test-bogus.t": { |
|
951 | "test-bogus.t": { | |
955 | "result": "skip" |
|
952 | "result": "skip" | |
956 | }, |
|
953 | }, | |
957 | "test-failure.t": { |
|
954 | "test-failure.t": { | |
958 | "result": "skip" |
|
955 | "result": "skip" | |
959 | } |
|
956 | } | |
960 | } (no-eol) |
|
957 | } (no-eol) | |
961 |
|
958 | |||
962 | Whitelist trumps blacklist |
|
959 | Whitelist trumps blacklist | |
963 | $ echo test-failure.t > whitelist |
|
960 | $ echo test-failure.t > whitelist | |
964 | $ rt --blacklist=blacklist --whitelist=whitelist --json\ |
|
961 | $ rt --blacklist=blacklist --whitelist=whitelist --json\ | |
965 | > test-failure.t test-bogus.t |
|
962 | > test-failure.t test-bogus.t | |
966 | s |
|
963 | s | |
967 | --- $TESTTMP/test-failure.t |
|
964 | --- $TESTTMP/test-failure.t | |
968 | +++ $TESTTMP/test-failure.t.err |
|
965 | +++ $TESTTMP/test-failure.t.err | |
969 | @@ -1,5 +1,5 @@ |
|
966 | @@ -1,5 +1,5 @@ | |
970 | $ echo babar |
|
967 | $ echo babar | |
971 | - rataxes |
|
968 | - rataxes | |
972 | + babar |
|
969 | + babar | |
973 | This is a noop statement so that |
|
970 | This is a noop statement so that | |
974 | this test is still more bytes than success. |
|
971 | this test is still more bytes than success. | |
975 | pad pad pad pad............................................................ |
|
972 | pad pad pad pad............................................................ | |
976 |
|
973 | |||
977 | ERROR: test-failure.t output changed |
|
974 | ERROR: test-failure.t output changed | |
978 | ! |
|
975 | ! | |
979 | Skipped test-bogus.t: Doesn't exist |
|
976 | Skipped test-bogus.t: Doesn't exist | |
980 | Failed test-failure.t: output changed |
|
977 | Failed test-failure.t: output changed | |
981 | # Ran 1 tests, 1 skipped, 1 failed. |
|
978 | # Ran 1 tests, 1 skipped, 1 failed. | |
982 | python hash seed: * (glob) |
|
979 | python hash seed: * (glob) | |
983 | [1] |
|
980 | [1] | |
984 |
|
981 | |||
985 | Ensure that --test-list causes only the tests listed in that file to |
|
982 | Ensure that --test-list causes only the tests listed in that file to | |
986 | be executed. |
|
983 | be executed. | |
987 | $ echo test-success.t >> onlytest |
|
984 | $ echo test-success.t >> onlytest | |
988 | $ rt --test-list=onlytest |
|
985 | $ rt --test-list=onlytest | |
989 | . |
|
986 | . | |
990 | # Ran 1 tests, 0 skipped, 0 failed. |
|
987 | # Ran 1 tests, 0 skipped, 0 failed. | |
991 | $ echo test-bogus.t >> anothertest |
|
988 | $ echo test-bogus.t >> anothertest | |
992 | $ rt --test-list=onlytest --test-list=anothertest |
|
989 | $ rt --test-list=onlytest --test-list=anothertest | |
993 | s. |
|
990 | s. | |
994 | Skipped test-bogus.t: Doesn't exist |
|
991 | Skipped test-bogus.t: Doesn't exist | |
995 | # Ran 1 tests, 1 skipped, 0 failed. |
|
992 | # Ran 1 tests, 1 skipped, 0 failed. | |
996 | $ rm onlytest anothertest |
|
993 | $ rm onlytest anothertest | |
997 |
|
994 | |||
998 | test for --json |
|
995 | test for --json | |
999 | ================== |
|
996 | ================== | |
1000 |
|
997 | |||
1001 | $ rt --json |
|
998 | $ rt --json | |
1002 |
|
999 | |||
1003 | --- $TESTTMP/test-failure.t |
|
1000 | --- $TESTTMP/test-failure.t | |
1004 | +++ $TESTTMP/test-failure.t.err |
|
1001 | +++ $TESTTMP/test-failure.t.err | |
1005 | @@ -1,5 +1,5 @@ |
|
1002 | @@ -1,5 +1,5 @@ | |
1006 | $ echo babar |
|
1003 | $ echo babar | |
1007 | - rataxes |
|
1004 | - rataxes | |
1008 | + babar |
|
1005 | + babar | |
1009 | This is a noop statement so that |
|
1006 | This is a noop statement so that | |
1010 | this test is still more bytes than success. |
|
1007 | this test is still more bytes than success. | |
1011 | pad pad pad pad............................................................ |
|
1008 | pad pad pad pad............................................................ | |
1012 |
|
1009 | |||
1013 | ERROR: test-failure.t output changed |
|
1010 | ERROR: test-failure.t output changed | |
1014 | !.s |
|
1011 | !.s | |
1015 | Skipped test-skip.t: missing feature: nail clipper |
|
1012 | Skipped test-skip.t: missing feature: nail clipper | |
1016 | Failed test-failure.t: output changed |
|
1013 | Failed test-failure.t: output changed | |
1017 | # Ran 2 tests, 1 skipped, 1 failed. |
|
1014 | # Ran 2 tests, 1 skipped, 1 failed. | |
1018 | python hash seed: * (glob) |
|
1015 | python hash seed: * (glob) | |
1019 | [1] |
|
1016 | [1] | |
1020 |
|
1017 | |||
1021 | $ cat report.json |
|
1018 | $ cat report.json | |
1022 | testreport ={ |
|
1019 | testreport ={ | |
1023 | "test-failure.t": [\{] (re) |
|
1020 | "test-failure.t": [\{] (re) | |
1024 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1021 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1025 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1022 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1026 | "diff": "---.+\+\+\+.+", ? (re) |
|
1023 | "diff": "---.+\+\+\+.+", ? (re) | |
1027 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1024 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1028 | "result": "failure", ? (re) |
|
1025 | "result": "failure", ? (re) | |
1029 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1026 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1030 | "time": "\s*[\d\.]{4,5}" (re) |
|
1027 | "time": "\s*[\d\.]{4,5}" (re) | |
1031 | }, ? (re) |
|
1028 | }, ? (re) | |
1032 | "test-skip.t": { |
|
1029 | "test-skip.t": { | |
1033 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1030 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1034 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1031 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1035 | "diff": "", ? (re) |
|
1032 | "diff": "", ? (re) | |
1036 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1033 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1037 | "result": "skip", ? (re) |
|
1034 | "result": "skip", ? (re) | |
1038 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1035 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1039 | "time": "\s*[\d\.]{4,5}" (re) |
|
1036 | "time": "\s*[\d\.]{4,5}" (re) | |
1040 | }, ? (re) |
|
1037 | }, ? (re) | |
1041 | "test-success.t": [\{] (re) |
|
1038 | "test-success.t": [\{] (re) | |
1042 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1039 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1043 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1040 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1044 | "diff": "", ? (re) |
|
1041 | "diff": "", ? (re) | |
1045 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1042 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1046 | "result": "success", ? (re) |
|
1043 | "result": "success", ? (re) | |
1047 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1044 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1048 | "time": "\s*[\d\.]{4,5}" (re) |
|
1045 | "time": "\s*[\d\.]{4,5}" (re) | |
1049 | } |
|
1046 | } | |
1050 | } (no-eol) |
|
1047 | } (no-eol) | |
1051 | --json with --outputdir |
|
1048 | --json with --outputdir | |
1052 |
|
1049 | |||
1053 | $ rm report.json |
|
1050 | $ rm report.json | |
1054 | $ rm -r output |
|
1051 | $ rm -r output | |
1055 | $ mkdir output |
|
1052 | $ mkdir output | |
1056 | $ rt --json --outputdir output |
|
1053 | $ rt --json --outputdir output | |
1057 |
|
1054 | |||
1058 | --- $TESTTMP/test-failure.t |
|
1055 | --- $TESTTMP/test-failure.t | |
1059 | +++ $TESTTMP/output/test-failure.t.err |
|
1056 | +++ $TESTTMP/output/test-failure.t.err | |
1060 | @@ -1,5 +1,5 @@ |
|
1057 | @@ -1,5 +1,5 @@ | |
1061 | $ echo babar |
|
1058 | $ echo babar | |
1062 | - rataxes |
|
1059 | - rataxes | |
1063 | + babar |
|
1060 | + babar | |
1064 | This is a noop statement so that |
|
1061 | This is a noop statement so that | |
1065 | this test is still more bytes than success. |
|
1062 | this test is still more bytes than success. | |
1066 | pad pad pad pad............................................................ |
|
1063 | pad pad pad pad............................................................ | |
1067 |
|
1064 | |||
1068 | ERROR: test-failure.t output changed |
|
1065 | ERROR: test-failure.t output changed | |
1069 | !.s |
|
1066 | !.s | |
1070 | Skipped test-skip.t: missing feature: nail clipper |
|
1067 | Skipped test-skip.t: missing feature: nail clipper | |
1071 | Failed test-failure.t: output changed |
|
1068 | Failed test-failure.t: output changed | |
1072 | # Ran 2 tests, 1 skipped, 1 failed. |
|
1069 | # Ran 2 tests, 1 skipped, 1 failed. | |
1073 | python hash seed: * (glob) |
|
1070 | python hash seed: * (glob) | |
1074 | [1] |
|
1071 | [1] | |
1075 | $ f report.json |
|
1072 | $ f report.json | |
1076 | report.json: file not found |
|
1073 | report.json: file not found | |
1077 | $ cat output/report.json |
|
1074 | $ cat output/report.json | |
1078 | testreport ={ |
|
1075 | testreport ={ | |
1079 | "test-failure.t": [\{] (re) |
|
1076 | "test-failure.t": [\{] (re) | |
1080 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1077 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1081 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1078 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1082 | "diff": "---.+\+\+\+.+", ? (re) |
|
1079 | "diff": "---.+\+\+\+.+", ? (re) | |
1083 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1080 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1084 | "result": "failure", ? (re) |
|
1081 | "result": "failure", ? (re) | |
1085 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1082 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1086 | "time": "\s*[\d\.]{4,5}" (re) |
|
1083 | "time": "\s*[\d\.]{4,5}" (re) | |
1087 | }, ? (re) |
|
1084 | }, ? (re) | |
1088 | "test-skip.t": { |
|
1085 | "test-skip.t": { | |
1089 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1086 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1090 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1087 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1091 | "diff": "", ? (re) |
|
1088 | "diff": "", ? (re) | |
1092 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1089 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1093 | "result": "skip", ? (re) |
|
1090 | "result": "skip", ? (re) | |
1094 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1091 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1095 | "time": "\s*[\d\.]{4,5}" (re) |
|
1092 | "time": "\s*[\d\.]{4,5}" (re) | |
1096 | }, ? (re) |
|
1093 | }, ? (re) | |
1097 | "test-success.t": [\{] (re) |
|
1094 | "test-success.t": [\{] (re) | |
1098 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1095 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1099 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1096 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1100 | "diff": "", ? (re) |
|
1097 | "diff": "", ? (re) | |
1101 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1098 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1102 | "result": "success", ? (re) |
|
1099 | "result": "success", ? (re) | |
1103 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1100 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1104 | "time": "\s*[\d\.]{4,5}" (re) |
|
1101 | "time": "\s*[\d\.]{4,5}" (re) | |
1105 | } |
|
1102 | } | |
1106 | } (no-eol) |
|
1103 | } (no-eol) | |
1107 | $ ls -a output |
|
1104 | $ ls -a output | |
1108 | . |
|
1105 | . | |
1109 | .. |
|
1106 | .. | |
1110 | .testtimes |
|
1107 | .testtimes | |
1111 | report.json |
|
1108 | report.json | |
1112 | test-failure.t.err |
|
1109 | test-failure.t.err | |
1113 |
|
1110 | |||
1114 | Test that failed test accepted through interactive are properly reported: |
|
1111 | Test that failed test accepted through interactive are properly reported: | |
1115 |
|
1112 | |||
1116 | $ cp test-failure.t backup |
|
1113 | $ cp test-failure.t backup | |
1117 | $ echo y | rt --json -i |
|
1114 | $ echo y | rt --json -i | |
1118 |
|
1115 | |||
1119 | --- $TESTTMP/test-failure.t |
|
1116 | --- $TESTTMP/test-failure.t | |
1120 | +++ $TESTTMP/test-failure.t.err |
|
1117 | +++ $TESTTMP/test-failure.t.err | |
1121 | @@ -1,5 +1,5 @@ |
|
1118 | @@ -1,5 +1,5 @@ | |
1122 | $ echo babar |
|
1119 | $ echo babar | |
1123 | - rataxes |
|
1120 | - rataxes | |
1124 | + babar |
|
1121 | + babar | |
1125 | This is a noop statement so that |
|
1122 | This is a noop statement so that | |
1126 | this test is still more bytes than success. |
|
1123 | this test is still more bytes than success. | |
1127 | pad pad pad pad............................................................ |
|
1124 | pad pad pad pad............................................................ | |
1128 | Accept this change? [n] ..s |
|
1125 | Accept this change? [n] ..s | |
1129 | Skipped test-skip.t: missing feature: nail clipper |
|
1126 | Skipped test-skip.t: missing feature: nail clipper | |
1130 | # Ran 2 tests, 1 skipped, 0 failed. |
|
1127 | # Ran 2 tests, 1 skipped, 0 failed. | |
1131 |
|
1128 | |||
1132 | $ cat report.json |
|
1129 | $ cat report.json | |
1133 | testreport ={ |
|
1130 | testreport ={ | |
1134 | "test-failure.t": [\{] (re) |
|
1131 | "test-failure.t": [\{] (re) | |
1135 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1132 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1136 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1133 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1137 | "diff": "", ? (re) |
|
1134 | "diff": "", ? (re) | |
1138 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1135 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1139 | "result": "success", ? (re) |
|
1136 | "result": "success", ? (re) | |
1140 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1137 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1141 | "time": "\s*[\d\.]{4,5}" (re) |
|
1138 | "time": "\s*[\d\.]{4,5}" (re) | |
1142 | }, ? (re) |
|
1139 | }, ? (re) | |
1143 | "test-skip.t": { |
|
1140 | "test-skip.t": { | |
1144 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1141 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1145 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1142 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1146 | "diff": "", ? (re) |
|
1143 | "diff": "", ? (re) | |
1147 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1144 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1148 | "result": "skip", ? (re) |
|
1145 | "result": "skip", ? (re) | |
1149 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1146 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1150 | "time": "\s*[\d\.]{4,5}" (re) |
|
1147 | "time": "\s*[\d\.]{4,5}" (re) | |
1151 | }, ? (re) |
|
1148 | }, ? (re) | |
1152 | "test-success.t": [\{] (re) |
|
1149 | "test-success.t": [\{] (re) | |
1153 | "csys": "\s*[\d\.]{4,5}", ? (re) |
|
1150 | "csys": "\s*[\d\.]{4,5}", ? (re) | |
1154 | "cuser": "\s*[\d\.]{4,5}", ? (re) |
|
1151 | "cuser": "\s*[\d\.]{4,5}", ? (re) | |
1155 | "diff": "", ? (re) |
|
1152 | "diff": "", ? (re) | |
1156 | "end": "\s*[\d\.]{4,5}", ? (re) |
|
1153 | "end": "\s*[\d\.]{4,5}", ? (re) | |
1157 | "result": "success", ? (re) |
|
1154 | "result": "success", ? (re) | |
1158 | "start": "\s*[\d\.]{4,5}", ? (re) |
|
1155 | "start": "\s*[\d\.]{4,5}", ? (re) | |
1159 | "time": "\s*[\d\.]{4,5}" (re) |
|
1156 | "time": "\s*[\d\.]{4,5}" (re) | |
1160 | } |
|
1157 | } | |
1161 | } (no-eol) |
|
1158 | } (no-eol) | |
1162 | $ mv backup test-failure.t |
|
1159 | $ mv backup test-failure.t | |
1163 |
|
1160 | |||
1164 | backslash on end of line with glob matching is handled properly |
|
1161 | backslash on end of line with glob matching is handled properly | |
1165 |
|
1162 | |||
1166 | $ cat > test-glob-backslash.t << EOF |
|
1163 | $ cat > test-glob-backslash.t << EOF | |
1167 | > $ echo 'foo bar \\' |
|
1164 | > $ echo 'foo bar \\' | |
1168 | > foo * \ (glob) |
|
1165 | > foo * \ (glob) | |
1169 | > EOF |
|
1166 | > EOF | |
1170 |
|
1167 | |||
1171 | $ rt test-glob-backslash.t |
|
1168 | $ rt test-glob-backslash.t | |
1172 | . |
|
1169 | . | |
1173 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1170 | # Ran 1 tests, 0 skipped, 0 failed. | |
1174 |
|
1171 | |||
1175 | $ rm -f test-glob-backslash.t |
|
1172 | $ rm -f test-glob-backslash.t | |
1176 |
|
1173 | |||
1177 | Test globbing of local IP addresses |
|
1174 | Test globbing of local IP addresses | |
1178 | $ echo 172.16.18.1 |
|
1175 | $ echo 172.16.18.1 | |
1179 | $LOCALIP (glob) |
|
1176 | $LOCALIP (glob) | |
1180 | $ echo dead:beef::1 |
|
1177 | $ echo dead:beef::1 | |
1181 | $LOCALIP (glob) |
|
1178 | $LOCALIP (glob) | |
1182 |
|
1179 | |||
1183 | Test reusability for third party tools |
|
1180 | Test reusability for third party tools | |
1184 | ====================================== |
|
1181 | ====================================== | |
1185 |
|
1182 | |||
1186 | $ mkdir "$TESTTMP"/anothertests |
|
1183 | $ mkdir "$TESTTMP"/anothertests | |
1187 | $ cd "$TESTTMP"/anothertests |
|
1184 | $ cd "$TESTTMP"/anothertests | |
1188 |
|
1185 | |||
1189 | test that `run-tests.py` can execute hghave, even if it runs not in |
|
1186 | test that `run-tests.py` can execute hghave, even if it runs not in | |
1190 | Mercurial source tree. |
|
1187 | Mercurial source tree. | |
1191 |
|
1188 | |||
1192 | $ cat > test-hghave.t <<EOF |
|
1189 | $ cat > test-hghave.t <<EOF | |
1193 | > #require true |
|
1190 | > #require true | |
1194 | > $ echo foo |
|
1191 | > $ echo foo | |
1195 | > foo |
|
1192 | > foo | |
1196 | > EOF |
|
1193 | > EOF | |
1197 | $ rt test-hghave.t |
|
1194 | $ rt test-hghave.t | |
1198 | . |
|
1195 | . | |
1199 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1196 | # Ran 1 tests, 0 skipped, 0 failed. | |
1200 |
|
1197 | |||
1201 | test that RUNTESTDIR refers the directory, in which `run-tests.py` now |
|
1198 | test that RUNTESTDIR refers the directory, in which `run-tests.py` now | |
1202 | running is placed. |
|
1199 | running is placed. | |
1203 |
|
1200 | |||
1204 | $ cat > test-runtestdir.t <<EOF |
|
1201 | $ cat > test-runtestdir.t <<EOF | |
1205 | > - $TESTDIR, in which test-run-tests.t is placed |
|
1202 | > - $TESTDIR, in which test-run-tests.t is placed | |
1206 | > - \$TESTDIR, in which test-runtestdir.t is placed (expanded at runtime) |
|
1203 | > - \$TESTDIR, in which test-runtestdir.t is placed (expanded at runtime) | |
1207 | > - \$RUNTESTDIR, in which run-tests.py is placed (expanded at runtime) |
|
1204 | > - \$RUNTESTDIR, in which run-tests.py is placed (expanded at runtime) | |
1208 | > |
|
1205 | > | |
1209 | > #if windows |
|
1206 | > #if windows | |
1210 | > $ test "\$TESTDIR" = "$TESTTMP\anothertests" |
|
1207 | > $ test "\$TESTDIR" = "$TESTTMP\anothertests" | |
1211 | > #else |
|
1208 | > #else | |
1212 | > $ test "\$TESTDIR" = "$TESTTMP"/anothertests |
|
1209 | > $ test "\$TESTDIR" = "$TESTTMP"/anothertests | |
1213 | > #endif |
|
1210 | > #endif | |
1214 | > $ test "\$RUNTESTDIR" = "$TESTDIR" |
|
1211 | > $ test "\$RUNTESTDIR" = "$TESTDIR" | |
1215 | > $ head -n 3 "\$RUNTESTDIR"/../contrib/check-code.py | sed 's@.!.*python@#!USRBINENVPY@' |
|
1212 | > $ head -n 3 "\$RUNTESTDIR"/../contrib/check-code.py | sed 's@.!.*python@#!USRBINENVPY@' | |
1216 | > #!USRBINENVPY |
|
1213 | > #!USRBINENVPY | |
1217 | > # |
|
1214 | > # | |
1218 | > # check-code - a style and portability checker for Mercurial |
|
1215 | > # check-code - a style and portability checker for Mercurial | |
1219 | > EOF |
|
1216 | > EOF | |
1220 | $ rt test-runtestdir.t |
|
1217 | $ rt test-runtestdir.t | |
1221 | . |
|
1218 | . | |
1222 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1219 | # Ran 1 tests, 0 skipped, 0 failed. | |
1223 |
|
1220 | |||
1224 | #if execbit |
|
1221 | #if execbit | |
1225 |
|
1222 | |||
1226 | test that TESTDIR is referred in PATH |
|
1223 | test that TESTDIR is referred in PATH | |
1227 |
|
1224 | |||
1228 | $ cat > custom-command.sh <<EOF |
|
1225 | $ cat > custom-command.sh <<EOF | |
1229 | > #!/bin/sh |
|
1226 | > #!/bin/sh | |
1230 | > echo "hello world" |
|
1227 | > echo "hello world" | |
1231 | > EOF |
|
1228 | > EOF | |
1232 | $ chmod +x custom-command.sh |
|
1229 | $ chmod +x custom-command.sh | |
1233 | $ cat > test-testdir-path.t <<EOF |
|
1230 | $ cat > test-testdir-path.t <<EOF | |
1234 | > $ custom-command.sh |
|
1231 | > $ custom-command.sh | |
1235 | > hello world |
|
1232 | > hello world | |
1236 | > EOF |
|
1233 | > EOF | |
1237 | $ rt test-testdir-path.t |
|
1234 | $ rt test-testdir-path.t | |
1238 | . |
|
1235 | . | |
1239 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1236 | # Ran 1 tests, 0 skipped, 0 failed. | |
1240 |
|
1237 | |||
1241 | #endif |
|
1238 | #endif | |
1242 |
|
1239 | |||
1243 | test support for --allow-slow-tests |
|
1240 | test support for --allow-slow-tests | |
1244 | $ cat > test-very-slow-test.t <<EOF |
|
1241 | $ cat > test-very-slow-test.t <<EOF | |
1245 | > #require slow |
|
1242 | > #require slow | |
1246 | > $ echo pass |
|
1243 | > $ echo pass | |
1247 | > pass |
|
1244 | > pass | |
1248 | > EOF |
|
1245 | > EOF | |
1249 | $ rt test-very-slow-test.t |
|
1246 | $ rt test-very-slow-test.t | |
1250 | s |
|
1247 | s | |
1251 | Skipped test-very-slow-test.t: missing feature: allow slow tests (use --allow-slow-tests) |
|
1248 | Skipped test-very-slow-test.t: missing feature: allow slow tests (use --allow-slow-tests) | |
1252 | # Ran 0 tests, 1 skipped, 0 failed. |
|
1249 | # Ran 0 tests, 1 skipped, 0 failed. | |
1253 | $ rt $HGTEST_RUN_TESTS_PURE --allow-slow-tests test-very-slow-test.t |
|
1250 | $ rt $HGTEST_RUN_TESTS_PURE --allow-slow-tests test-very-slow-test.t | |
1254 | . |
|
1251 | . | |
1255 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1252 | # Ran 1 tests, 0 skipped, 0 failed. | |
1256 |
|
1253 | |||
1257 | support for running a test outside the current directory |
|
1254 | support for running a test outside the current directory | |
1258 | $ mkdir nonlocal |
|
1255 | $ mkdir nonlocal | |
1259 | $ cat > nonlocal/test-is-not-here.t << EOF |
|
1256 | $ cat > nonlocal/test-is-not-here.t << EOF | |
1260 | > $ echo pass |
|
1257 | > $ echo pass | |
1261 | > pass |
|
1258 | > pass | |
1262 | > EOF |
|
1259 | > EOF | |
1263 | $ rt nonlocal/test-is-not-here.t |
|
1260 | $ rt nonlocal/test-is-not-here.t | |
1264 | . |
|
1261 | . | |
1265 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1262 | # Ran 1 tests, 0 skipped, 0 failed. | |
1266 |
|
1263 | |||
1267 | support for bisecting failed tests automatically |
|
1264 | support for bisecting failed tests automatically | |
1268 | $ hg init bisect |
|
1265 | $ hg init bisect | |
1269 | $ cd bisect |
|
1266 | $ cd bisect | |
1270 | $ cat >> test-bisect.t <<EOF |
|
1267 | $ cat >> test-bisect.t <<EOF | |
1271 | > $ echo pass |
|
1268 | > $ echo pass | |
1272 | > pass |
|
1269 | > pass | |
1273 | > EOF |
|
1270 | > EOF | |
1274 | $ hg add test-bisect.t |
|
1271 | $ hg add test-bisect.t | |
1275 | $ hg ci -m 'good' |
|
1272 | $ hg ci -m 'good' | |
1276 | $ cat >> test-bisect.t <<EOF |
|
1273 | $ cat >> test-bisect.t <<EOF | |
1277 | > $ echo pass |
|
1274 | > $ echo pass | |
1278 | > fail |
|
1275 | > fail | |
1279 | > EOF |
|
1276 | > EOF | |
1280 | $ hg ci -m 'bad' |
|
1277 | $ hg ci -m 'bad' | |
1281 | $ rt --known-good-rev=0 test-bisect.t |
|
1278 | $ rt --known-good-rev=0 test-bisect.t | |
1282 |
|
1279 | |||
1283 | --- $TESTTMP/anothertests/bisect/test-bisect.t |
|
1280 | --- $TESTTMP/anothertests/bisect/test-bisect.t | |
1284 | +++ $TESTTMP/anothertests/bisect/test-bisect.t.err |
|
1281 | +++ $TESTTMP/anothertests/bisect/test-bisect.t.err | |
1285 | @@ -1,4 +1,4 @@ |
|
1282 | @@ -1,4 +1,4 @@ | |
1286 | $ echo pass |
|
1283 | $ echo pass | |
1287 | pass |
|
1284 | pass | |
1288 | $ echo pass |
|
1285 | $ echo pass | |
1289 | - fail |
|
1286 | - fail | |
1290 | + pass |
|
1287 | + pass | |
1291 |
|
1288 | |||
1292 | ERROR: test-bisect.t output changed |
|
1289 | ERROR: test-bisect.t output changed | |
1293 | ! |
|
1290 | ! | |
1294 | Failed test-bisect.t: output changed |
|
1291 | Failed test-bisect.t: output changed | |
1295 | test-bisect.t broken by 72cbf122d116 (bad) |
|
1292 | test-bisect.t broken by 72cbf122d116 (bad) | |
1296 | # Ran 1 tests, 0 skipped, 1 failed. |
|
1293 | # Ran 1 tests, 0 skipped, 1 failed. | |
1297 | python hash seed: * (glob) |
|
1294 | python hash seed: * (glob) | |
1298 | [1] |
|
1295 | [1] | |
1299 |
|
1296 | |||
1300 | $ cd .. |
|
1297 | $ cd .. | |
1301 |
|
1298 | |||
1302 | support bisecting a separate repo |
|
1299 | support bisecting a separate repo | |
1303 |
|
1300 | |||
1304 | $ hg init bisect-dependent |
|
1301 | $ hg init bisect-dependent | |
1305 | $ cd bisect-dependent |
|
1302 | $ cd bisect-dependent | |
1306 | $ cat > test-bisect-dependent.t <<EOF |
|
1303 | $ cat > test-bisect-dependent.t <<EOF | |
1307 | > $ tail -1 \$TESTDIR/../bisect/test-bisect.t |
|
1304 | > $ tail -1 \$TESTDIR/../bisect/test-bisect.t | |
1308 | > pass |
|
1305 | > pass | |
1309 | > EOF |
|
1306 | > EOF | |
1310 | $ hg commit -Am dependent test-bisect-dependent.t |
|
1307 | $ hg commit -Am dependent test-bisect-dependent.t | |
1311 |
|
1308 | |||
1312 | $ rt --known-good-rev=0 test-bisect-dependent.t |
|
1309 | $ rt --known-good-rev=0 test-bisect-dependent.t | |
1313 |
|
1310 | |||
1314 | --- $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t |
|
1311 | --- $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t | |
1315 | +++ $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t.err |
|
1312 | +++ $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t.err | |
1316 | @@ -1,2 +1,2 @@ |
|
1313 | @@ -1,2 +1,2 @@ | |
1317 | $ tail -1 $TESTDIR/../bisect/test-bisect.t |
|
1314 | $ tail -1 $TESTDIR/../bisect/test-bisect.t | |
1318 | - pass |
|
1315 | - pass | |
1319 | + fail |
|
1316 | + fail | |
1320 |
|
1317 | |||
1321 | ERROR: test-bisect-dependent.t output changed |
|
1318 | ERROR: test-bisect-dependent.t output changed | |
1322 | ! |
|
1319 | ! | |
1323 | Failed test-bisect-dependent.t: output changed |
|
1320 | Failed test-bisect-dependent.t: output changed | |
1324 | Failed to identify failure point for test-bisect-dependent.t |
|
1321 | Failed to identify failure point for test-bisect-dependent.t | |
1325 | # Ran 1 tests, 0 skipped, 1 failed. |
|
1322 | # Ran 1 tests, 0 skipped, 1 failed. | |
1326 | python hash seed: * (glob) |
|
1323 | python hash seed: * (glob) | |
1327 | [1] |
|
1324 | [1] | |
1328 |
|
1325 | |||
1329 | $ rt --bisect-repo=../test-bisect test-bisect-dependent.t |
|
1326 | $ rt --bisect-repo=../test-bisect test-bisect-dependent.t | |
1330 | Usage: run-tests.py [options] [tests] |
|
1327 | Usage: run-tests.py [options] [tests] | |
1331 |
|
1328 | |||
1332 | run-tests.py: error: --bisect-repo cannot be used without --known-good-rev |
|
1329 | run-tests.py: error: --bisect-repo cannot be used without --known-good-rev | |
1333 | [2] |
|
1330 | [2] | |
1334 |
|
1331 | |||
1335 | $ rt --known-good-rev=0 --bisect-repo=../bisect test-bisect-dependent.t |
|
1332 | $ rt --known-good-rev=0 --bisect-repo=../bisect test-bisect-dependent.t | |
1336 |
|
1333 | |||
1337 | --- $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t |
|
1334 | --- $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t | |
1338 | +++ $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t.err |
|
1335 | +++ $TESTTMP/anothertests/bisect-dependent/test-bisect-dependent.t.err | |
1339 | @@ -1,2 +1,2 @@ |
|
1336 | @@ -1,2 +1,2 @@ | |
1340 | $ tail -1 $TESTDIR/../bisect/test-bisect.t |
|
1337 | $ tail -1 $TESTDIR/../bisect/test-bisect.t | |
1341 | - pass |
|
1338 | - pass | |
1342 | + fail |
|
1339 | + fail | |
1343 |
|
1340 | |||
1344 | ERROR: test-bisect-dependent.t output changed |
|
1341 | ERROR: test-bisect-dependent.t output changed | |
1345 | ! |
|
1342 | ! | |
1346 | Failed test-bisect-dependent.t: output changed |
|
1343 | Failed test-bisect-dependent.t: output changed | |
1347 | test-bisect-dependent.t broken by 72cbf122d116 (bad) |
|
1344 | test-bisect-dependent.t broken by 72cbf122d116 (bad) | |
1348 | # Ran 1 tests, 0 skipped, 1 failed. |
|
1345 | # Ran 1 tests, 0 skipped, 1 failed. | |
1349 | python hash seed: * (glob) |
|
1346 | python hash seed: * (glob) | |
1350 | [1] |
|
1347 | [1] | |
1351 |
|
1348 | |||
1352 | $ cd .. |
|
1349 | $ cd .. | |
1353 |
|
1350 | |||
1354 | Test a broken #if statement doesn't break run-tests threading. |
|
1351 | Test a broken #if statement doesn't break run-tests threading. | |
1355 | ============================================================== |
|
1352 | ============================================================== | |
1356 | $ mkdir broken |
|
1353 | $ mkdir broken | |
1357 | $ cd broken |
|
1354 | $ cd broken | |
1358 | $ cat > test-broken.t <<EOF |
|
1355 | $ cat > test-broken.t <<EOF | |
1359 | > true |
|
1356 | > true | |
1360 | > #if notarealhghavefeature |
|
1357 | > #if notarealhghavefeature | |
1361 | > $ false |
|
1358 | > $ false | |
1362 | > #endif |
|
1359 | > #endif | |
1363 | > EOF |
|
1360 | > EOF | |
1364 | $ for f in 1 2 3 4 ; do |
|
1361 | $ for f in 1 2 3 4 ; do | |
1365 | > cat > test-works-$f.t <<EOF |
|
1362 | > cat > test-works-$f.t <<EOF | |
1366 | > This is test case $f |
|
1363 | > This is test case $f | |
1367 | > $ sleep 1 |
|
1364 | > $ sleep 1 | |
1368 | > EOF |
|
1365 | > EOF | |
1369 | > done |
|
1366 | > done | |
1370 | $ rt -j 2 |
|
1367 | $ rt -j 2 | |
1371 | .... |
|
1368 | .... | |
1372 | # Ran 5 tests, 0 skipped, 0 failed. |
|
1369 | # Ran 5 tests, 0 skipped, 0 failed. | |
1373 | skipped: unknown feature: notarealhghavefeature |
|
1370 | skipped: unknown feature: notarealhghavefeature | |
1374 |
|
1371 | |||
1375 | $ cd .. |
|
1372 | $ cd .. | |
1376 | $ rm -rf broken |
|
1373 | $ rm -rf broken | |
1377 |
|
1374 | |||
1378 | Test cases in .t files |
|
1375 | Test cases in .t files | |
1379 | ====================== |
|
1376 | ====================== | |
1380 | $ mkdir cases |
|
1377 | $ mkdir cases | |
1381 | $ cd cases |
|
1378 | $ cd cases | |
1382 | $ cat > test-cases-abc.t <<'EOF' |
|
1379 | $ cat > test-cases-abc.t <<'EOF' | |
1383 | > #testcases A B C |
|
1380 | > #testcases A B C | |
1384 | > $ V=B |
|
1381 | > $ V=B | |
1385 | > #if A |
|
1382 | > #if A | |
1386 | > $ V=A |
|
1383 | > $ V=A | |
1387 | > #endif |
|
1384 | > #endif | |
1388 | > #if C |
|
1385 | > #if C | |
1389 | > $ V=C |
|
1386 | > $ V=C | |
1390 | > #endif |
|
1387 | > #endif | |
1391 | > $ echo $V | sed 's/A/C/' |
|
1388 | > $ echo $V | sed 's/A/C/' | |
1392 | > C |
|
1389 | > C | |
1393 | > #if C |
|
1390 | > #if C | |
1394 | > $ [ $V = C ] |
|
1391 | > $ [ $V = C ] | |
1395 | > #endif |
|
1392 | > #endif | |
1396 | > #if A |
|
1393 | > #if A | |
1397 | > $ [ $V = C ] |
|
1394 | > $ [ $V = C ] | |
1398 | > [1] |
|
1395 | > [1] | |
1399 | > #endif |
|
1396 | > #endif | |
1400 | > #if no-C |
|
1397 | > #if no-C | |
1401 | > $ [ $V = C ] |
|
1398 | > $ [ $V = C ] | |
1402 | > [1] |
|
1399 | > [1] | |
1403 | > #endif |
|
1400 | > #endif | |
1404 | > $ [ $V = D ] |
|
1401 | > $ [ $V = D ] | |
1405 | > [1] |
|
1402 | > [1] | |
1406 | > EOF |
|
1403 | > EOF | |
1407 | $ rt |
|
1404 | $ rt | |
1408 | . |
|
1405 | . | |
1409 | --- $TESTTMP/anothertests/cases/test-cases-abc.t |
|
1406 | --- $TESTTMP/anothertests/cases/test-cases-abc.t | |
1410 | +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err |
|
1407 | +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err | |
1411 | @@ -7,7 +7,7 @@ |
|
1408 | @@ -7,7 +7,7 @@ | |
1412 | $ V=C |
|
1409 | $ V=C | |
1413 | #endif |
|
1410 | #endif | |
1414 | $ echo $V | sed 's/A/C/' |
|
1411 | $ echo $V | sed 's/A/C/' | |
1415 | - C |
|
1412 | - C | |
1416 | + B |
|
1413 | + B | |
1417 | #if C |
|
1414 | #if C | |
1418 | $ [ $V = C ] |
|
1415 | $ [ $V = C ] | |
1419 | #endif |
|
1416 | #endif | |
1420 |
|
1417 | |||
1421 | ERROR: test-cases-abc.t (case B) output changed |
|
1418 | ERROR: test-cases-abc.t (case B) output changed | |
1422 | !. |
|
1419 | !. | |
1423 | Failed test-cases-abc.t (case B): output changed |
|
1420 | Failed test-cases-abc.t (case B): output changed | |
1424 | # Ran 3 tests, 0 skipped, 1 failed. |
|
1421 | # Ran 3 tests, 0 skipped, 1 failed. | |
1425 | python hash seed: * (glob) |
|
1422 | python hash seed: * (glob) | |
1426 | [1] |
|
1423 | [1] | |
1427 |
|
1424 | |||
1428 | --restart works |
|
1425 | --restart works | |
1429 |
|
1426 | |||
1430 | $ rt --restart |
|
1427 | $ rt --restart | |
1431 |
|
1428 | |||
1432 | --- $TESTTMP/anothertests/cases/test-cases-abc.t |
|
1429 | --- $TESTTMP/anothertests/cases/test-cases-abc.t | |
1433 | +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err |
|
1430 | +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err | |
1434 | @@ -7,7 +7,7 @@ |
|
1431 | @@ -7,7 +7,7 @@ | |
1435 | $ V=C |
|
1432 | $ V=C | |
1436 | #endif |
|
1433 | #endif | |
1437 | $ echo $V | sed 's/A/C/' |
|
1434 | $ echo $V | sed 's/A/C/' | |
1438 | - C |
|
1435 | - C | |
1439 | + B |
|
1436 | + B | |
1440 | #if C |
|
1437 | #if C | |
1441 | $ [ $V = C ] |
|
1438 | $ [ $V = C ] | |
1442 | #endif |
|
1439 | #endif | |
1443 |
|
1440 | |||
1444 | ERROR: test-cases-abc.t (case B) output changed |
|
1441 | ERROR: test-cases-abc.t (case B) output changed | |
1445 | !. |
|
1442 | !. | |
1446 | Failed test-cases-abc.t (case B): output changed |
|
1443 | Failed test-cases-abc.t (case B): output changed | |
1447 | # Ran 2 tests, 0 skipped, 1 failed. |
|
1444 | # Ran 2 tests, 0 skipped, 1 failed. | |
1448 | python hash seed: * (glob) |
|
1445 | python hash seed: * (glob) | |
1449 | [1] |
|
1446 | [1] | |
1450 |
|
1447 | |||
1451 | --restart works with outputdir |
|
1448 | --restart works with outputdir | |
1452 |
|
1449 | |||
1453 | $ mkdir output |
|
1450 | $ mkdir output | |
1454 | $ mv test-cases-abc.t.B.err output |
|
1451 | $ mv test-cases-abc.t.B.err output | |
1455 | $ rt --restart --outputdir output |
|
1452 | $ rt --restart --outputdir output | |
1456 |
|
1453 | |||
1457 | --- $TESTTMP/anothertests/cases/test-cases-abc.t |
|
1454 | --- $TESTTMP/anothertests/cases/test-cases-abc.t | |
1458 | +++ $TESTTMP/anothertests/cases/output/test-cases-abc.t.B.err |
|
1455 | +++ $TESTTMP/anothertests/cases/output/test-cases-abc.t.B.err | |
1459 | @@ -7,7 +7,7 @@ |
|
1456 | @@ -7,7 +7,7 @@ | |
1460 | $ V=C |
|
1457 | $ V=C | |
1461 | #endif |
|
1458 | #endif | |
1462 | $ echo $V | sed 's/A/C/' |
|
1459 | $ echo $V | sed 's/A/C/' | |
1463 | - C |
|
1460 | - C | |
1464 | + B |
|
1461 | + B | |
1465 | #if C |
|
1462 | #if C | |
1466 | $ [ $V = C ] |
|
1463 | $ [ $V = C ] | |
1467 | #endif |
|
1464 | #endif | |
1468 |
|
1465 | |||
1469 | ERROR: test-cases-abc.t (case B) output changed |
|
1466 | ERROR: test-cases-abc.t (case B) output changed | |
1470 | !. |
|
1467 | !. | |
1471 | Failed test-cases-abc.t (case B): output changed |
|
1468 | Failed test-cases-abc.t (case B): output changed | |
1472 | # Ran 2 tests, 0 skipped, 1 failed. |
|
1469 | # Ran 2 tests, 0 skipped, 1 failed. | |
1473 | python hash seed: * (glob) |
|
1470 | python hash seed: * (glob) | |
1474 | [1] |
|
1471 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now