Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(997)

Unified Diff: mojo/devtools/common/mojo_test

Issue 1259243003: Allow to pass additional shell arguments in `mojo_test`. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/devtools/common/mojo_run ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/devtools/common/mojo_test
diff --git a/mojo/devtools/common/mojo_test b/mojo/devtools/common/mojo_test
index 7529ec8a23c8826a22adc59244657c67b3bdd655..ca9baa21355f00c0f640da49c36095153a3796c7 100755
--- a/mojo/devtools/common/mojo_test
+++ b/mojo/devtools/common/mojo_test
@@ -31,6 +31,11 @@ The program may use the |target_os| global that will be any of ['android',
TODO(vtl|msw): Add a way of specifying data dependencies.
"""
+_DESCRIPTION = """Runner for Mojo application tests.
+
+Any arguments not recognized by the script will be passed on as shell arguments.
+"""
+
import argparse
import sys
@@ -39,17 +44,16 @@ from devtoolslib import shell_arguments
def main():
- parser = argparse.ArgumentParser(description="Test runner for Mojo "
- "application tests.")
+ parser = argparse.ArgumentParser(description=_DESCRIPTION)
parser.add_argument("test_list_file", type=file,
help="a file listing apptests to run")
# Common shell configuration arguments.
shell_arguments.AddShellArguments(parser)
- script_args = parser.parse_args()
+ script_args, shell_args = parser.parse_known_args()
try:
- shell, shell_args = shell_arguments.ConfigureShell(script_args, [])
+ shell, shell_args = shell_arguments.ConfigureShell(script_args, shell_args)
except shell_arguments.ShellConfigurationException as e:
print e
return 1
« no previous file with comments | « mojo/devtools/common/mojo_run ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698