Show More
@@ -303,6 +303,8 b' def getparser():' | |||
|
303 | 303 | help="skip tests listed in the specified blacklist file") |
|
304 | 304 | parser.add_option("--whitelist", action="append", |
|
305 | 305 | help="always run tests listed in the specified whitelist file") |
|
306 | parser.add_option("--test-list", action="append", | |
|
307 | help="read tests to run from the specified file") | |
|
306 | 308 | parser.add_option("--changed", type="string", |
|
307 | 309 | help="run tests that are changed in parent rev or working directory") |
|
308 | 310 | parser.add_option("-C", "--annotate", action="store_true", |
@@ -2279,6 +2281,10 b' class TestRunner(object):' | |||
|
2279 | 2281 | # positional arguments are paths to test files to run, so |
|
2280 | 2282 | # we make sure they're all bytestrings |
|
2281 | 2283 | args = [_bytespath(a) for a in args] |
|
2284 | if options.test_list is not None: | |
|
2285 | for listfile in options.test_list: | |
|
2286 | with open(listfile, 'rb') as f: | |
|
2287 | args.extend(t for t in f.read().splitlines() if t) | |
|
2282 | 2288 | self.options = options |
|
2283 | 2289 | |
|
2284 | 2290 | self._checktools() |
@@ -981,6 +981,19 b' Whitelist trumps blacklist' | |||
|
981 | 981 | python hash seed: * (glob) |
|
982 | 982 | [1] |
|
983 | 983 | |
|
984 | Ensure that --test-list causes only the tests listed in that file to | |
|
985 | be executed. | |
|
986 | $ echo test-success.t >> onlytest | |
|
987 | $ rt --test-list=onlytest | |
|
988 | . | |
|
989 | # Ran 1 tests, 0 skipped, 0 failed. | |
|
990 | $ echo test-bogus.t >> anothertest | |
|
991 | $ rt --test-list=onlytest --test-list=anothertest | |
|
992 | s. | |
|
993 | Skipped test-bogus.t: Doesn't exist | |
|
994 | # Ran 1 tests, 1 skipped, 0 failed. | |
|
995 | $ rm onlytest anothertest | |
|
996 | ||
|
984 | 997 | test for --json |
|
985 | 998 | ================== |
|
986 | 999 |
General Comments 0
You need to be logged in to leave comments.
Login now