##// END OF EJS Templates
run-tests: make --restart work with output dir
Siddharth Agarwal -
r32720:0cd641bf default
parent child Browse files
Show More
@@ -2397,10 +2397,12 b' class TestRunner(object):'
2397 orig = list(testdescs)
2397 orig = list(testdescs)
2398 while testdescs:
2398 while testdescs:
2399 desc = testdescs[0]
2399 desc = testdescs[0]
2400 # desc['path'] is a relative path
2400 if 'case' in desc:
2401 if 'case' in desc:
2401 errpath = b'%s.%s.err' % (desc['path'], desc['case'])
2402 errpath = b'%s.%s.err' % (desc['path'], desc['case'])
2402 else:
2403 else:
2403 errpath = b'%s.err' % desc['path']
2404 errpath = b'%s.err' % desc['path']
2405 errpath = os.path.join(self._outputdir, errpath)
2404 if os.path.exists(errpath):
2406 if os.path.exists(errpath):
2405 break
2407 break
2406 testdescs.pop(0)
2408 testdescs.pop(0)
@@ -1183,3 +1183,28 b' Test cases in .t files'
1183 # Ran 2 tests, 0 skipped, 0 warned, 1 failed.
1183 # Ran 2 tests, 0 skipped, 0 warned, 1 failed.
1184 python hash seed: * (glob)
1184 python hash seed: * (glob)
1185 [1]
1185 [1]
1186
1187 --restart works with outputdir
1188
1189 $ mkdir output
1190 $ mv test-cases-abc.t.B.err output
1191 $ rt --restart --outputdir output
1192
1193 --- $TESTTMP/anothertests/cases/test-cases-abc.t
1194 +++ $TESTTMP/anothertests/cases/output/test-cases-abc.t.B.err
1195 @@ -7,7 +7,7 @@
1196 $ V=C
1197 #endif
1198 $ echo $V | sed 's/A/C/'
1199 - C
1200 + B
1201 #if C
1202 $ [ $V = C ]
1203 #endif
1204
1205 ERROR: test-cases-abc.t (case B) output changed
1206 !.
1207 Failed test-cases-abc.t (case B): output changed
1208 # Ran 2 tests, 0 skipped, 0 warned, 1 failed.
1209 python hash seed: * (glob)
1210 [1]
General Comments 0
You need to be logged in to leave comments. Login now