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

Unified Diff: tools/telemetry/telemetry/unittest/run_tests.py

Issue 407243004: Modify telemetry tests to write test-results-compatible json files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update w/ review feedback Created 6 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 | « tools/telemetry/telemetry/unittest/json_results.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/unittest/run_tests.py
diff --git a/tools/telemetry/telemetry/unittest/run_tests.py b/tools/telemetry/telemetry/unittest/run_tests.py
index 83f605b0652ec9bbf9f82d26a874c544e9db5e05..bc36e2b0653b524d89c4cfddd0663963123ef92f 100644
--- a/tools/telemetry/telemetry/unittest/run_tests.py
+++ b/tools/telemetry/telemetry/unittest/run_tests.py
@@ -10,6 +10,7 @@ from telemetry.core import browser_finder
from telemetry.core import browser_options
from telemetry.core import command_line
from telemetry.core import discover
+from telemetry.unittest import json_results
from telemetry.unittest import output_formatter
@@ -125,6 +126,7 @@ class RunTestsCommand(command_line.OptparseCommand):
dest='run_disabled_tests',
action='store_true', default=False,
help='Ignore @Disabled and @Enabled restrictions.')
+ json_results.AddOptions(parser)
@classmethod
def ProcessCommandLineArgs(cls, parser, args):
@@ -141,6 +143,8 @@ class RunTestsCommand(command_line.OptparseCommand):
'Re-run with --browser=list to see '
'available browser types.' % args.browser_type)
+ json_results.ValidateArgs(parser, args)
+
def Run(self, args):
possible_browser = browser_finder.FindBrowser(args)
test_suite = DiscoverTests(
@@ -149,6 +153,9 @@ class RunTestsCommand(command_line.OptparseCommand):
runner = output_formatter.TestRunner()
result = runner.run(
test_suite, config.output_formatters, args.repeat_count, args)
+
+ json_results.WriteandUploadResultsIfNecessary(args, test_suite, result)
+
return len(result.failures_and_errors)
@classmethod
« no previous file with comments | « tools/telemetry/telemetry/unittest/json_results.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698