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

Side by Side Diff: scripts/slave/recipe_modules/chromium_tests/steps.py

Issue 2230043002: Make test-results upload URL configurable. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: rebase Created 4 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
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 datetime 5 import datetime
6 import re 6 import re
7 import string 7 import string
8 8
9 9
10 class Test(object): 10 class Test(object):
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 344
345 if hasattr(step_result, 'test_utils'): 345 if hasattr(step_result, 'test_utils'):
346 r = step_result.test_utils.gtest_results 346 r = step_result.test_utils.gtest_results
347 p = step_result.presentation 347 p = step_result.presentation
348 348
349 if r.valid: 349 if r.valid:
350 p.step_text += api.test_utils.format_step_text([ 350 p.step_text += api.test_utils.format_step_text([
351 ['failures:', r.failures] 351 ['failures:', r.failures]
352 ]) 352 ])
353 353
354 if api.test_results.c.test_results_server:
355 api.test_results.upload(
356 api.json.input(r.raw),
357 test_type=self.name,
358 chrome_revision=api.bot_update.last_returned_properties.get(
359 'got_revision_cp', 'x@{#0}'))
360
361
354 return step_result 362 return step_result
355 363
356 def has_valid_results(self, api, suffix): 364 def has_valid_results(self, api, suffix):
357 if suffix not in self._test_runs: 365 if suffix not in self._test_runs:
358 return False # pragma: no cover 366 return False # pragma: no cover
359 if not hasattr(self._test_runs[suffix], 'test_utils'): 367 if not hasattr(self._test_runs[suffix], 'test_utils'):
360 return False # pragma: no cover 368 return False # pragma: no cover
361 gtest_results = self._test_runs[suffix].test_utils.gtest_results 369 gtest_results = self._test_runs[suffix].test_utils.gtest_results
362 if not gtest_results.valid: # pragma: no cover 370 if not gtest_results.valid: # pragma: no cover
363 return False 371 return False
(...skipping 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after
1761 args=args) 1769 args=args)
1762 api.gsutil.upload( 1770 api.gsutil.upload(
1763 temp_output_dir.join( 1771 temp_output_dir.join(
1764 '%s-android-chrome.json' % timestamp_string), 1772 '%s-android-chrome.json' % timestamp_string),
1765 'chromium-annotated-tests', 'android') 1773 'chromium-annotated-tests', 'android')
1766 1774
1767 GOMA_TESTS = [ 1775 GOMA_TESTS = [
1768 GTestTest('base_unittests'), 1776 GTestTest('base_unittests'),
1769 GTestTest('content_unittests'), 1777 GTestTest('content_unittests'),
1770 ] 1778 ]
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/chromium_tests/chromium_android.py ('k') | scripts/slave/recipe_modules/test_results/api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698