| 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 1825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1836 def name(self): | 1836 def name(self): |
| 1837 return 'diagnose_goma' | 1837 return 'diagnose_goma' |
| 1838 | 1838 |
| 1839 @staticmethod | 1839 @staticmethod |
| 1840 def compile_targets(_): | 1840 def compile_targets(_): |
| 1841 return [] | 1841 return [] |
| 1842 | 1842 |
| 1843 def run(self, api, suffix, test_filter=None): | 1843 def run(self, api, suffix, test_filter=None): |
| 1844 diagnose_goma_log_py = api.path['build'].join('goma', | 1844 diagnose_goma_log_py = api.path['build'].join('goma', |
| 1845 'diagnose_goma_log.py') | 1845 'diagnose_goma_log.py') |
| 1846 api.python('diagnose_goma', diagnose_goma_log_py, []) | 1846 api.python('diagnose_goma', diagnose_goma_log_py, |
| 1847 ['--output-json', api.json.output()]) |
| 1848 step_result = api.step.active_result |
| 1849 out_json = step_result.json |
| 1850 text_output = [ |
| 1851 'version %(goma_version)s, commit %(goma_revision)s' % output_json, |
| 1852 'Fatal %(fatal)d, Error %(error)d, Warning %(warning)d' % |
| 1853 output_json['stats'] |
| 1854 ] |
| 1855 text_output.extend(out_json['messages']) |
| 1856 step_result.presentation.step_text += api.test_utils.format_step_text( |
| 1857 text_output) |
| 1847 | 1858 |
| 1848 | 1859 |
| 1849 class IncrementalCoverageTest(Test): | 1860 class IncrementalCoverageTest(Test): |
| 1850 name = 'incremental_coverage' | 1861 name = 'incremental_coverage' |
| 1851 | 1862 |
| 1852 @property | 1863 @property |
| 1853 def uses_local_devices(self): | 1864 def uses_local_devices(self): |
| 1854 return True | 1865 return True |
| 1855 | 1866 |
| 1856 def has_valid_results(self, api, suffix): | 1867 def has_valid_results(self, api, suffix): |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1872 def run(self, api, suffix, test_filter=None): | 1883 def run(self, api, suffix, test_filter=None): |
| 1873 api.chromium_android.coverage_report(upload=False) | 1884 api.chromium_android.coverage_report(upload=False) |
| 1874 api.chromium_android.get_changed_lines_for_revision() | 1885 api.chromium_android.get_changed_lines_for_revision() |
| 1875 api.chromium_android.incremental_coverage_report() | 1886 api.chromium_android.incremental_coverage_report() |
| 1876 | 1887 |
| 1877 | 1888 |
| 1878 GOMA_TESTS = [ | 1889 GOMA_TESTS = [ |
| 1879 GTestTest('base_unittests'), | 1890 GTestTest('base_unittests'), |
| 1880 GTestTest('content_unittests'), | 1891 GTestTest('content_unittests'), |
| 1881 ] | 1892 ] |
| OLD | NEW |