| 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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 | 573 |
| 574 tests['steps'] = {k: v for k, v in tests['steps'].iteritems() | 574 tests['steps'] = {k: v for k, v in tests['steps'].iteritems() |
| 575 if v['device_affinity'] / self._num_device_shards == self._shard_index} | 575 if v['device_affinity'] / self._num_device_shards == self._shard_index} |
| 576 for test_info in tests['steps'].itervalues(): | 576 for test_info in tests['steps'].itervalues(): |
| 577 test_info['device_affinity'] %= self._num_device_shards | 577 test_info['device_affinity'] %= self._num_device_shards |
| 578 | 578 |
| 579 return tests | 579 return tests |
| 580 | 580 |
| 581 def _run_sharded(self, api, tests): | 581 def _run_sharded(self, api, tests): |
| 582 known_devices_file = ( | 582 known_devices_file = ( |
| 583 api.path['build'].join( | 583 api.infra_paths['build'].join( |
| 584 'site_config', self._known_devices_file) if self._known_devices_file | 584 'site_config', self._known_devices_file) if self._known_devices_file |
| 585 else None) | 585 else None) |
| 586 api.chromium_android.run_sharded_perf_tests( | 586 api.chromium_android.run_sharded_perf_tests( |
| 587 config=api.json.input(data=tests), | 587 config=api.json.input(data=tests), |
| 588 perf_id=self._perf_id, | 588 perf_id=self._perf_id, |
| 589 chartjson_file=True, | 589 chartjson_file=True, |
| 590 max_battery_temp=self._max_battery_temp, | 590 max_battery_temp=self._max_battery_temp, |
| 591 known_devices_file=known_devices_file) | 591 known_devices_file=known_devices_file) |
| 592 | 592 |
| 593 def _run_serially(self, api, tests): | 593 def _run_serially(self, api, tests): |
| (...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1671 | 1671 |
| 1672 @staticmethod | 1672 @staticmethod |
| 1673 def compile_targets(api): | 1673 def compile_targets(api): |
| 1674 return ['blink_tests'] | 1674 return ['blink_tests'] |
| 1675 | 1675 |
| 1676 @property | 1676 @property |
| 1677 def uses_local_devices(self): | 1677 def uses_local_devices(self): |
| 1678 return True | 1678 return True |
| 1679 | 1679 |
| 1680 def run(self, api, suffix, test_filter=None): | 1680 def run(self, api, suffix, test_filter=None): |
| 1681 results_dir = api.path['slave_build'].join('layout-test-results') | 1681 results_dir = api.infra_paths['slave_build'].join('layout-test-results') |
| 1682 | 1682 |
| 1683 step_name = self._step_name(suffix) | 1683 step_name = self._step_name(suffix) |
| 1684 args = [ | 1684 args = [ |
| 1685 '--target', api.chromium.c.BUILD_CONFIG, | 1685 '--target', api.chromium.c.BUILD_CONFIG, |
| 1686 '-o', results_dir, | 1686 '-o', results_dir, |
| 1687 '--build-dir', api.chromium.c.build_dir, | 1687 '--build-dir', api.chromium.c.build_dir, |
| 1688 '--json-test-results', api.test_utils.test_results(add_json_log=False), | 1688 '--json-test-results', api.test_utils.test_results(add_json_log=False), |
| 1689 '--test-results-server', 'test-results.appspot.com', | 1689 '--test-results-server', 'test-results.appspot.com', |
| 1690 '--build-number', str(api.properties['buildnumber']), | 1690 '--build-number', str(api.properties['buildnumber']), |
| 1691 '--builder-name', api.properties['buildername'], | 1691 '--builder-name', api.properties['buildername'], |
| 1692 '--step-name', step_name, | 1692 '--step-name', step_name, |
| 1693 ] | 1693 ] |
| 1694 if api.chromium.c.TARGET_PLATFORM == 'android': | 1694 if api.chromium.c.TARGET_PLATFORM == 'android': |
| 1695 args.extend(['--platform', 'android']) | 1695 args.extend(['--platform', 'android']) |
| 1696 if self._extra_args: | 1696 if self._extra_args: |
| 1697 args.extend(self._extra_args) | 1697 args.extend(self._extra_args) |
| 1698 if suffix == 'without patch': | 1698 if suffix == 'without patch': |
| 1699 test_list = "\n".join(self.failures(api, 'with patch')) | 1699 test_list = "\n".join(self.failures(api, 'with patch')) |
| 1700 args.extend(['--test-list', api.raw_io.input(test_list), | 1700 args.extend(['--test-list', api.raw_io.input(test_list), |
| 1701 '--skipped', 'always']) | 1701 '--skipped', 'always']) |
| 1702 | 1702 |
| 1703 try: | 1703 try: |
| 1704 step_result = api.chromium.runtest( | 1704 step_result = api.chromium.runtest( |
| 1705 api.path['build'].join('scripts', 'slave', 'chromium', | 1705 api.infra_paths['build'].join('scripts', 'slave', 'chromium', |
| 1706 'layout_test_wrapper.py'), | 1706 'layout_test_wrapper.py'), |
| 1707 args, name=step_name, | 1707 args, name=step_name, |
| 1708 # TODO(phajdan.jr): Clean up the runtest.py mess. | 1708 # TODO(phajdan.jr): Clean up the runtest.py mess. |
| 1709 disable_src_side_runtest_py=True, | 1709 disable_src_side_runtest_py=True, |
| 1710 step_test_data=lambda: api.test_utils.test_api.canned_test_output( | 1710 step_test_data=lambda: api.test_utils.test_api.canned_test_output( |
| 1711 passing=True, minimal=True)) | 1711 passing=True, minimal=True)) |
| 1712 | 1712 |
| 1713 # Mark steps with unexpected flakes as warnings. Do this here instead of | 1713 # Mark steps with unexpected flakes as warnings. Do this here instead of |
| 1714 # "finally" blocks because we only want to do this if step was successful. | 1714 # "finally" blocks because we only want to do this if step was successful. |
| 1715 # We don't want to possibly change failing steps to warnings. | 1715 # We don't want to possibly change failing steps to warnings. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1727 p.step_text += api.test_utils.format_step_text([ | 1727 p.step_text += api.test_utils.format_step_text([ |
| 1728 ['unexpected_flakes:', r.unexpected_flakes.keys()], | 1728 ['unexpected_flakes:', r.unexpected_flakes.keys()], |
| 1729 ['unexpected_failures:', r.unexpected_failures.keys()], | 1729 ['unexpected_failures:', r.unexpected_failures.keys()], |
| 1730 ['Total executed: %s' % r.num_passes], | 1730 ['Total executed: %s' % r.num_passes], |
| 1731 ]) | 1731 ]) |
| 1732 | 1732 |
| 1733 if suffix in ('', 'with patch'): | 1733 if suffix in ('', 'with patch'): |
| 1734 buildername = api.properties['buildername'] | 1734 buildername = api.properties['buildername'] |
| 1735 buildnumber = api.properties['buildnumber'] | 1735 buildnumber = api.properties['buildnumber'] |
| 1736 | 1736 |
| 1737 archive_layout_test_results = api.path['build'].join( | 1737 archive_layout_test_results = api.infra_paths['build'].join( |
| 1738 'scripts', 'slave', 'chromium', 'archive_layout_test_results.py') | 1738 'scripts', 'slave', 'chromium', 'archive_layout_test_results.py') |
| 1739 | 1739 |
| 1740 archive_layout_test_args = [ | 1740 archive_layout_test_args = [ |
| 1741 '--results-dir', results_dir, | 1741 '--results-dir', results_dir, |
| 1742 '--build-dir', api.chromium.c.build_dir, | 1742 '--build-dir', api.chromium.c.build_dir, |
| 1743 '--build-number', buildnumber, | 1743 '--build-number', buildnumber, |
| 1744 '--builder-name', buildername, | 1744 '--builder-name', buildername, |
| 1745 '--gs-bucket', 'gs://chromium-layout-test-archives', | 1745 '--gs-bucket', 'gs://chromium-layout-test-archives', |
| 1746 ] | 1746 ] |
| 1747 # TODO(phajdan.jr): Pass gs_acl as a parameter, not build property. | 1747 # TODO(phajdan.jr): Pass gs_acl as a parameter, not build property. |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1850 def run(self, api, suffix, test_filter=None): | 1850 def run(self, api, suffix, test_filter=None): |
| 1851 api.chromium_android.coverage_report(upload=False) | 1851 api.chromium_android.coverage_report(upload=False) |
| 1852 api.chromium_android.get_changed_lines_for_revision() | 1852 api.chromium_android.get_changed_lines_for_revision() |
| 1853 api.chromium_android.incremental_coverage_report() | 1853 api.chromium_android.incremental_coverage_report() |
| 1854 | 1854 |
| 1855 | 1855 |
| 1856 GOMA_TESTS = [ | 1856 GOMA_TESTS = [ |
| 1857 GTestTest('base_unittests'), | 1857 GTestTest('base_unittests'), |
| 1858 GTestTest('content_unittests'), | 1858 GTestTest('content_unittests'), |
| 1859 ] | 1859 ] |
| OLD | NEW |