-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --test option to specify test to run #368
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm, have 3 comments inlined
test_runner.py
Outdated
@@ -29,11 +29,12 @@ class OverrideDefinitions: | |||
|
|||
override_args: Sequence[Sequence[str]] = tuple(tuple(" ")) | |||
test_descr: str = "default" | |||
test_id: str = "default" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like a test_name
rather than test_id
? could we rename to test_name
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed 👍
@@ -244,7 +240,7 @@ def run_test(test_flavor: OverrideDefinitions, full_path: str): | |||
|
|||
|
|||
def run_tests(args): | |||
integration_tests_flavors = build_test_list(args) | |||
integration_tests_flavors = build_test_list() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we remove the args
here, is it not getting used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's right.
@@ -255,13 +251,19 @@ def run_tests(args): | |||
) | |||
if is_integration_test: | |||
for test_flavor in integration_tests_flavors[config_file]: | |||
run_test(test_flavor, full_path) | |||
if args.test == "all" or test_flavor.test_id == args.test: | |||
run_test(test_flavor, full_path, args.output_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should still assert the output_dir
specified, otherwise we should error out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
output_dir
is a required argument to the python program:
parser.add_argument("output_dir")
If not provided, the program entry would fail:
usage: test_runner.py [-h] [--config_dir CONFIG_DIR] [--test TEST] output_dir
test_runner.py: error: the following arguments are required: output_dir
Usage: `--test <test_id>` Acceptable values: `test_id` in `build_test_list` (default: all) Example: ``` rm -rf outputs && python test_runner.py outputs --test pp_gpipe ```
Usage: `--test <test_id>` Acceptable values: `test_id` in `build_test_list` (default: all) Example: ``` rm -rf outputs && python test_runner.py outputs --test pp_gpipe ```
Usage:
--test <test_id>
Acceptable values:
test_id
inbuild_test_list
(default: all)Example: