The above is the *minumum* you should run before posting a patch to
https://gem5-review.googlesource.com
+## Running tests from multiple directories
+
+The command line above will walk the directory tree starting from the cwd
+(tests), and it will run every test it encounters in its path. It is possible
+to specify multiple root directories by providing several positional
+arguments:
+
+```shell
+./main.py run <directory1> <directory2> [...]
+```
+
+This will load every test in directory1 and directory2 (and their
+subdirectories).
+
## Specifying a subset of tests to run
You can use the tag query interface to specify the exact tests you want to run.
-# Copyright (c) 2020 ARM Limited
+# Copyright (c) 2020-2021 ARM Limited
# All rights reserved
#
# The license below extends only to copyright in the software and shall
# A list of common arguments/flags used across cli parsers.
common_args = [
Argument(
- 'directory',
- nargs='?',
- default=os.getcwd(),
- help='Directory to start searching for tests in'),
+ 'directories',
+ nargs='*',
+ default=[os.getcwd()],
+ help='Space separated list of directories to start searching '
+ 'for tests in'),
Argument(
'--exclude-tags',
action=StorePositionalTagsAction,
common_args.uid.add_to(parser)
common_args.skip_build.add_to(parser)
- common_args.directory.add_to(parser)
+ common_args.directories.add_to(parser)
common_args.build_dir.add_to(parser)
common_args.base_dir.add_to(parser)
common_args.bin_path.add_to(parser)
help='Quiet output (machine readable).'
).add_to(parser)
- common_args.directory.add_to(parser)
+ common_args.directories.add_to(parser)
common_args.bin_path.add_to(parser)
common_args.isa.add_to(parser)
common_args.variant.add_to(parser)
super(RerunParser, self).__init__(parser)
common_args.skip_build.add_to(parser)
- common_args.directory.add_to(parser)
+ common_args.directories.add_to(parser)
common_args.build_dir.add_to(parser)
common_args.base_dir.add_to(parser)
common_args.bin_path.add_to(parser)
testloader = loader_mod.Loader()
log.test_log.message(terminal.separator())
log.test_log.message('Loading Tests', bold=True)
- testloader.load_root(configuration.config.directory)
+
+ for root in configuration.config.directories:
+ testloader.load_root(root)
+
return testloader
def do_list():