diff options
author | bajones@chromium.org <bajones@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-11 17:46:52 +0000 |
---|---|---|
committer | bajones@chromium.org <bajones@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-11 17:46:52 +0000 |
commit | d64d4c8eae596c5827f022d016a25c34379369f6 (patch) | |
tree | 1f5629bd6ec61cf552e8a2ccb4d8480028d744cf /tools | |
parent | c8663d62f12de9d440e495497f157d7ff803bc05 (diff) | |
download | chromium_src-d64d4c8eae596c5827f022d016a25c34379369f6.zip chromium_src-d64d4c8eae596c5827f022d016a25c34379369f6.tar.gz chromium_src-d64d4c8eae596c5827f022d016a25c34379369f6.tar.bz2 |
Added ability for Telemetry tests to specify their own command line args
This will be critical to allowing the bots to communicate configuration
details to the tests when using Recipies.
BUG=278398
R=dtu@chromium.org, kbr@chromium.org
Review URL: https://codereview.chromium.org/23698006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222587 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r-- | tools/telemetry/telemetry/test.py | 5 | ||||
-rw-r--r-- | tools/telemetry/telemetry/test_runner.py | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tools/telemetry/telemetry/test.py b/tools/telemetry/telemetry/test.py index 1cda68a..d902fe0 100644 --- a/tools/telemetry/telemetry/test.py +++ b/tools/telemetry/telemetry/test.py @@ -76,3 +76,8 @@ class Test(object): @staticmethod def AddCommandLineOptions(parser): page_runner.AddCommandLineOptions(parser) + + @staticmethod + def AddTestCommandLineOptions(parser): + """Override to accept custom command line options.""" + pass diff --git a/tools/telemetry/telemetry/test_runner.py b/tools/telemetry/telemetry/test_runner.py index 9555341..0b0a834 100644 --- a/tools/telemetry/telemetry/test_runner.py +++ b/tools/telemetry/telemetry/test_runner.py @@ -96,6 +96,11 @@ class Run(Command): def AddParserOptions(self, parser): test.Test.AddCommandLineOptions(parser) + # Allow tests to add their own command line options + for arg in sys.argv[1:]: + if arg in _GetTests(): + _GetTests()[arg].AddTestCommandLineOptions(parser) + def ValidateCommandLine(self, parser, options, args): if not args: parser.error('Must provide at least one test name') |