Show More
@@ -2353,6 +2353,12 b' class TestRunner(object):' | |||||
2353 |
|
2353 | |||
2354 | self._testdir = osenvironb[b'TESTDIR'] = getattr( |
|
2354 | self._testdir = osenvironb[b'TESTDIR'] = getattr( | |
2355 | os, 'getcwdb', os.getcwd)() |
|
2355 | os, 'getcwdb', os.getcwd)() | |
|
2356 | # assume all tests in same folder for now | |||
|
2357 | if testdescs: | |||
|
2358 | pathname = os.path.dirname(testdescs[0]['path']) | |||
|
2359 | if pathname and not osenvironb[b'TESTDIR'].endswith('/'): | |||
|
2360 | osenvironb[b'TESTDIR'] += '/' | |||
|
2361 | osenvironb[b'TESTDIR'] += pathname | |||
2356 | if self.options.outputdir: |
|
2362 | if self.options.outputdir: | |
2357 | self._outputdir = canonpath(_bytespath(self.options.outputdir)) |
|
2363 | self._outputdir = canonpath(_bytespath(self.options.outputdir)) | |
2358 | else: |
|
2364 | else: |
@@ -1261,6 +1261,22 b' support for running a test outside the c' | |||||
1261 | . |
|
1261 | . | |
1262 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1262 | # Ran 1 tests, 0 skipped, 0 failed. | |
1263 |
|
1263 | |||
|
1264 | support for running run-tests.py from another directory | |||
|
1265 | $ mkdir tmp && cd tmp | |||
|
1266 | $ cat > useful-file.sh << EOF | |||
|
1267 | > important command | |||
|
1268 | > EOF | |||
|
1269 | ||||
|
1270 | $ cat > test-folder.t << EOF | |||
|
1271 | > $ cat \$TESTDIR/useful-file.sh | |||
|
1272 | > important command | |||
|
1273 | > EOF | |||
|
1274 | ||||
|
1275 | $ cd .. | |||
|
1276 | $ $PYTHON $TESTDIR/run-tests.py tmp/test-folder.t | |||
|
1277 | . | |||
|
1278 | # Ran 1 tests, 0 skipped, 0 failed. | |||
|
1279 | ||||
1264 | support for bisecting failed tests automatically |
|
1280 | support for bisecting failed tests automatically | |
1265 | $ hg init bisect |
|
1281 | $ hg init bisect | |
1266 | $ cd bisect |
|
1282 | $ cd bisect |
General Comments 0
You need to be logged in to leave comments.
Login now