Show More
@@ -2510,6 +2510,16 b' class TestRunner(object):' | |||
|
2510 | 2510 | else: |
|
2511 | 2511 | args = os.listdir(b'.') |
|
2512 | 2512 | |
|
2513 | expanded_args = [] | |
|
2514 | for arg in args: | |
|
2515 | if os.path.isdir(arg): | |
|
2516 | if not arg.endswith(b'/'): | |
|
2517 | arg += b'/' | |
|
2518 | expanded_args.extend([arg + a for a in os.listdir(arg)]) | |
|
2519 | else: | |
|
2520 | expanded_args.append(arg) | |
|
2521 | args = expanded_args | |
|
2522 | ||
|
2513 | 2523 | tests = [] |
|
2514 | 2524 | for t in args: |
|
2515 | 2525 | if not (os.path.basename(t).startswith(b'test-') |
@@ -1261,6 +1261,24 b' support for running a test outside the c' | |||
|
1261 | 1261 | . |
|
1262 | 1262 | # Ran 1 tests, 0 skipped, 0 failed. |
|
1263 | 1263 | |
|
1264 | support for automatically discovering test if arg is a folder | |
|
1265 | $ mkdir tmp && cd tmp | |
|
1266 | ||
|
1267 | $ cat > test-uno.t << EOF | |
|
1268 | > $ echo line | |
|
1269 | > line | |
|
1270 | > EOF | |
|
1271 | ||
|
1272 | $ cp test-uno.t test-dos.t | |
|
1273 | $ cd .. | |
|
1274 | $ cp -R tmp tmpp | |
|
1275 | $ cp tmp/test-uno.t test-solo.t | |
|
1276 | ||
|
1277 | $ $PYTHON $TESTDIR/run-tests.py tmp/ test-solo.t tmpp | |
|
1278 | ..... | |
|
1279 | # Ran 5 tests, 0 skipped, 0 failed. | |
|
1280 | $ rm -rf tmp tmpp | |
|
1281 | ||
|
1264 | 1282 | support for running run-tests.py from another directory |
|
1265 | 1283 | $ mkdir tmp && cd tmp |
|
1266 | 1284 | $ cat > useful-file.sh << EOF |
General Comments 0
You need to be logged in to leave comments.
Login now