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