diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-06-18 12:01:01 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2018-06-18 19:36:26 +0000 |
commit | d88c5df0cf7a7f72dd88b6c888180b064c73ac0c (patch) | |
tree | 5500a0c755db9d1e6fcdba7eaf35104d9b677c14 /test/test.py | |
parent | f1c410275f94116f729d4302a9d121192e65d1b1 (diff) |
Test+CMake: Make our test grouping more fine-grained.
Split our tests by suite_*.group_* instead of suite_*. There are quite a
few dfilter tests and this should make them more parallelizable.
Change-Id: I52371409618cda70dc99811e8de1fb1ad9d9a3b6
Reviewed-on: https://code.wireshark.org/review/28329
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'test/test.py')
-rwxr-xr-x | test/test.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/test.py b/test/test.py index cc6c134e30..a1c0b059fc 100755 --- a/test/test.py +++ b/test/test.py @@ -50,7 +50,8 @@ def main(): list_group = parser.add_mutually_exclusive_group() list_group.add_argument('-l', '--list', action='store_true', help='List tests. One of "all" or a full or partial test name.') list_group.add_argument('--list-suites', action='store_true', help='List all suites.') - list_group.add_argument('--list-cases', action='store_true', help='List all suites and cases.') + list_group.add_argument('--list-groups', action='store_true', help='List all suites and groups.') + list_group.add_argument('--list-cases', action='store_true', help='List all suites, groups, and cases.') parser.add_argument('-v', '--verbose', action='store_const', const=2, default=1, help='Verbose tests.') parser.add_argument('tests_to_run', nargs='*', metavar='test', default=['all'], help='Tests to run. One of "all" or a full or partial test name. Default is "all".') args = parser.parse_args() @@ -94,10 +95,24 @@ def main(): config.all_suites = list(all_suites) config.all_suites.sort() + all_groups = set() + for aid in all_ids: + aparts = aid.split('.') + if aparts[1].startswith('group_'): + all_groups |= {'.'.join(aparts[:2])} + else: + all_groups |= {aparts[0]} + config.all_groups = list(all_groups) + config.all_groups.sort() + if args.list_suites: print('\n'.join(config.all_suites)) sys.exit(0) + if args.list_groups: + print('\n'.join(config.all_groups)) + sys.exit(0) + if args.list_cases: cases = set() for rid in run_ids: |