Chromium Code Reviews| 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 re | 5 import re |
| 6 import string | 6 import string |
| 7 | 7 |
| 8 | 8 |
| 9 class Test(object): | 9 class Test(object): |
| 10 """ | 10 """ |
| (...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 880 'got_revision_cp', 'x@{#0}') | 880 'got_revision_cp', 'x@{#0}') |
| 881 chrome_revision = str(api.commit_position.parse_revision( | 881 chrome_revision = str(api.commit_position.parse_revision( |
| 882 chrome_revision_cp)) | 882 chrome_revision_cp)) |
| 883 api.test_results.upload( | 883 api.test_results.upload( |
| 884 api.json.input(parsed_gtest_data), | 884 api.json.input(parsed_gtest_data), |
| 885 chrome_revision=chrome_revision, | 885 chrome_revision=chrome_revision, |
| 886 test_type=step_result.step['name'], | 886 test_type=step_result.step['name'], |
| 887 test_results_server='test-results.appspot.com') | 887 test_results_server='test-results.appspot.com') |
| 888 | 888 |
| 889 | 889 |
| 890 # TODO(bpastene) Remove all AMP recipe code once all use of it has been | |
| 891 # discontinued. crbug.com/603943 | |
| 890 class AMPTest(Test): | 892 class AMPTest(Test): |
| 891 AMP_INSTANCE_ADDRESS = '172.22.21.180' | 893 AMP_INSTANCE_ADDRESS = '172.22.21.180' |
| 892 AMP_INSTANCE_PORT = '80' | 894 AMP_INSTANCE_PORT = '80' |
| 893 AMP_INSTANCE_PROTOCOL = 'http' | 895 AMP_INSTANCE_PROTOCOL = 'http' |
| 894 AMP_RESULTS_BUCKET = 'chrome-amp-results' | 896 AMP_RESULTS_BUCKET = 'chrome-amp-results' |
| 895 def __init__(self, name, device_name=None, device_os=None, device_oem=None, | 897 def __init__(self, name, device_name=None, device_os=None, device_oem=None, |
| 896 test_run_timeout=None): | 898 test_run_timeout=None): |
| 897 self._name = name | 899 self._name = name |
| 898 self._device_name = device_name | 900 self._device_name = device_name |
| 899 self._device_os = device_os | 901 self._device_os = device_os |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 975 valid = False | 977 valid = False |
| 976 failures = None | 978 failures = None |
| 977 | 979 |
| 978 if valid: | 980 if valid: |
| 979 step_result.presentation.step_text += api.test_utils.format_step_text([ | 981 step_result.presentation.step_text += api.test_utils.format_step_text([ |
| 980 ['failures:', failures] | 982 ['failures:', failures] |
| 981 ]) | 983 ]) |
| 982 | 984 |
| 983 return valid, failures | 985 return valid, failures |
| 984 | 986 |
| 985 def has_valid_results(self, api, suffix): | 987 def has_valid_results(self, api, suffix): # pragma: no cover |
| 986 return suffix in self._step_results and self._step_results[suffix]['valid'] | 988 return suffix in self._step_results and self._step_results[suffix]['valid'] |
| 987 | 989 |
| 988 def failures(self, api, suffix): | 990 def failures(self, api, suffix): # pragma: no cover |
|
bpastene
2016/04/15 16:49:23
Hopefully you can forgive my use of the 'no cover'
| |
| 989 assert self.has_valid_results(api, suffix) | 991 assert self.has_valid_results(api, suffix) |
| 990 return self._step_results[suffix]['failures'] | 992 return self._step_results[suffix]['failures'] |
| 991 | 993 |
| 992 | 994 |
| 993 class AMPGTestTest(AMPTest): | 995 class AMPGTestTest(AMPTest): |
| 994 def __init__(self, name, args=None, target_name=None, device_name=None, | 996 def __init__(self, name, args=None, target_name=None, device_name=None, |
| 995 device_os=None, device_oem=None, android_isolate_path=None, | 997 device_os=None, device_oem=None, android_isolate_path=None, |
| 996 test_run_timeout=None, **runtest_kwargs): | 998 test_run_timeout=None, **runtest_kwargs): |
| 997 super(AMPGTestTest, self).__init__( | 999 super(AMPGTestTest, self).__init__( |
| 998 name=name, device_name=device_name, device_os=device_os, | 1000 name=name, device_name=device_name, device_os=device_os, |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1856 def run(self, api, suffix, test_filter=None): | 1858 def run(self, api, suffix, test_filter=None): |
| 1857 api.chromium_android.coverage_report(upload=False) | 1859 api.chromium_android.coverage_report(upload=False) |
| 1858 api.chromium_android.get_changed_lines_for_revision() | 1860 api.chromium_android.get_changed_lines_for_revision() |
| 1859 api.chromium_android.incremental_coverage_report() | 1861 api.chromium_android.incremental_coverage_report() |
| 1860 | 1862 |
| 1861 | 1863 |
| 1862 GOMA_TESTS = [ | 1864 GOMA_TESTS = [ |
| 1863 GTestTest('base_unittests'), | 1865 GTestTest('base_unittests'), |
| 1864 GTestTest('content_unittests'), | 1866 GTestTest('content_unittests'), |
| 1865 ] | 1867 ] |
| OLD | NEW |