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

Side by Side Diff: tools/telemetry/telemetry/unittest/run_tests.py

Issue 456483002: Add support for uploading results to the flakiness dashboard (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove retry logic from upload Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/telemetry/telemetry/unittest/json_results.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 The Chromium Authors. All rights reserved. 1 # Copyright 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import unittest 6 import unittest
7 7
8 from telemetry import decorators 8 from telemetry import decorators
9 from telemetry.core import browser_finder 9 from telemetry.core import browser_finder
10 from telemetry.core import browser_options 10 from telemetry.core import browser_options
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 _, result = self.RunOneSuite(possible_browser, args) 164 _, result = self.RunOneSuite(possible_browser, args)
165 results.append(result) 165 results.append(result)
166 166
167 failed_tests = json_results.FailedTestNames(result) 167 failed_tests = json_results.FailedTestNames(result)
168 retry_limit -= 1 168 retry_limit -= 1
169 169
170 full_results = json_results.FullResults(args, test_suite, results) 170 full_results = json_results.FullResults(args, test_suite, results)
171 json_results.WriteFullResultsIfNecessary(args, full_results) 171 json_results.WriteFullResultsIfNecessary(args, full_results)
172 172
173 err_occurred, err_str = json_results.UploadFullResultsIfNecessary(
174 args, full_results)
175 if err_occurred:
176 for line in err_str.splitlines():
177 logging.error(line)
178 return 1
179
173 return json_results.ExitCodeFromFullResults(full_results) 180 return json_results.ExitCodeFromFullResults(full_results)
174 181
175 def RunOneSuite(self, possible_browser, args): 182 def RunOneSuite(self, possible_browser, args):
176 test_suite = DiscoverTests(config.test_dirs, config.top_level_dir, 183 test_suite = DiscoverTests(config.test_dirs, config.top_level_dir,
177 possible_browser, args.positional_args, 184 possible_browser, args.positional_args,
178 args.run_disabled_tests) 185 args.run_disabled_tests)
179 runner = output_formatter.TestRunner() 186 runner = output_formatter.TestRunner()
180 result = runner.run(test_suite, config.output_formatters, 187 result = runner.run(test_suite, config.output_formatters,
181 args.repeat_count, args) 188 args.repeat_count, args)
182 return test_suite, result 189 return test_suite, result
183 190
184 @classmethod 191 @classmethod
185 @RestoreLoggingLevel 192 @RestoreLoggingLevel
186 def main(cls, args=None): 193 def main(cls, args=None):
187 return super(RunTestsCommand, cls).main(args) 194 return super(RunTestsCommand, cls).main(args)
OLDNEW
« 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