| OLD | NEW |
| 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 | 351 |
| 352 if hasattr(step_result, 'test_utils'): | 352 if hasattr(step_result, 'test_utils'): |
| 353 r = step_result.test_utils.gtest_results | 353 r = step_result.test_utils.gtest_results |
| 354 p = step_result.presentation | 354 p = step_result.presentation |
| 355 | 355 |
| 356 if r.valid: | 356 if r.valid: |
| 357 p.step_text += api.test_utils.format_step_text([ | 357 p.step_text += api.test_utils.format_step_text([ |
| 358 ['failures:', r.failures] | 358 ['failures:', r.failures] |
| 359 ]) | 359 ]) |
| 360 | 360 |
| 361 api.test_results.upload( |
| 362 api.json.input(r.raw), |
| 363 test_type=self.name, |
| 364 chrome_revision=api.bot_update.last_returned_properties.get( |
| 365 'got_revision_cp', 'x@{#0}'), |
| 366 test_results_server='test-results.appspot.com') |
| 367 |
| 361 return step_result | 368 return step_result |
| 362 | 369 |
| 363 def has_valid_results(self, api, suffix): | 370 def has_valid_results(self, api, suffix): |
| 364 if suffix not in self._test_runs: | 371 if suffix not in self._test_runs: |
| 365 return False # pragma: no cover | 372 return False # pragma: no cover |
| 366 if not hasattr(self._test_runs[suffix], 'test_utils'): | 373 if not hasattr(self._test_runs[suffix], 'test_utils'): |
| 367 return False # pragma: no cover | 374 return False # pragma: no cover |
| 368 gtest_results = self._test_runs[suffix].test_utils.gtest_results | 375 gtest_results = self._test_runs[suffix].test_utils.gtest_results |
| 369 if not gtest_results.valid: # pragma: no cover | 376 if not gtest_results.valid: # pragma: no cover |
| 370 return False | 377 return False |
| (...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1744 args=args) | 1751 args=args) |
| 1745 api.gsutil.upload( | 1752 api.gsutil.upload( |
| 1746 temp_output_dir.join( | 1753 temp_output_dir.join( |
| 1747 '%s-android-chrome.json' % timestamp_string), | 1754 '%s-android-chrome.json' % timestamp_string), |
| 1748 'chromium-annotated-tests', 'android') | 1755 'chromium-annotated-tests', 'android') |
| 1749 | 1756 |
| 1750 GOMA_TESTS = [ | 1757 GOMA_TESTS = [ |
| 1751 GTestTest('base_unittests'), | 1758 GTestTest('base_unittests'), |
| 1752 GTestTest('content_unittests'), | 1759 GTestTest('content_unittests'), |
| 1753 ] | 1760 ] |
| OLD | NEW |