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

Unified Diff: mojo/devtools/common/mojo_test

Issue 1267483002: Put the `mojo_test` test list format in the command line description. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Move the imports to their place. 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 | « no previous file | 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 49d00e04ac659cb6ba17c3d280d0df68af17ac37..c824f10b1ae6a5fa5c84002a3498b784aa99b51c 100755
--- a/mojo/devtools/common/mojo_test
+++ b/mojo/devtools/common/mojo_test
@@ -5,8 +5,21 @@
"""Test runner for Mojo application tests.
-The file describing the list of tests has to be a valid Python program that sets
-a |tests| global variable, containing entries of the following form:
+TODO(vtl|msw): Add a way of specifying data dependencies.
ppi 2015/07/29 13:38:43 here.
+"""
+
+import argparse
+import logging
+import sys
+
+from devtoolslib import apptest_dart
+from devtoolslib import apptest_gtest
+from devtoolslib import shell_arguments
+
+_DESCRIPTION = """Runner for Mojo application tests.
+
+|test_list_file| has to be a valid Python program that sets a |tests| global
+variable, containing entries of the following form:
{
# Required URL for apptest.
@@ -16,39 +29,28 @@ a |tests| global variable, containing entries of the following form:
# Optional test type. Valid values:
# * "gtest" (default)
# * "gtest_isolated": like "gtest", but run with fixture isolation,
- # i.e., each test in a fresh mojo_shell)
- # * "dart".
+ # i.e., each test in a fresh mojo_shell
+ # * "dart"
"type": "gtest",
- # Optional arguments for the apptest.
+ # Optional arguments to be passed to the apptest.
"test-args": ["--an_arg", "another_arg"],
- # Optional arguments for the shell.
+ # Optional shell arguments.
"shell-args": ["--some-flag-for-the-shell", "--another-flag"],
}
-The program may use the |target_os| global that will be any of ['android',
-'linux'], indicating the system on which the tests are to be run.
-
-TODO(vtl|msw): Add a way of specifying data dependencies.
qsr 2015/07/29 13:37:57 Where is this todo gone?
-"""
-
-_DESCRIPTION = """Runner for Mojo application tests.
+|test_list_file| may reference the |target_os| global that will be any of
+['android', 'linux'], indicating the system on which the tests are to be run.
Any arguments not recognized by the script will be passed on as shell arguments.
"""
-import argparse
-import logging
-import sys
-
-from devtoolslib import apptest_dart
-from devtoolslib import apptest_gtest
-from devtoolslib import shell_arguments
-
_logger = logging.getLogger()
def main():
- parser = argparse.ArgumentParser(description=_DESCRIPTION)
+ parser = argparse.ArgumentParser(
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ description=_DESCRIPTION)
parser.add_argument("test_list_file", type=file,
help="a file listing apptests to run")
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698