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

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

Issue 1678273003: Split out instrumentation test name map for further use. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 mock_test_results = { 1499 mock_test_results = {
1500 'per_iteration_data': [{'TestA': [{'status': 'SUCCESS'}]}, 1500 'per_iteration_data': [{'TestA': [{'status': 'SUCCESS'}]},
1501 {'TestB': [{'status': 'FAILURE'}]}] 1501 {'TestB': [{'status': 'FAILURE'}]}]
1502 } 1502 }
1503 api.chromium_android.run_java_unit_test_suite( 1503 api.chromium_android.run_java_unit_test_suite(
1504 self.name, verbose=True, suffix=suffix, 1504 self.name, verbose=True, suffix=suffix,
1505 json_results_file=json_results_file, 1505 json_results_file=json_results_file,
1506 step_test_data=lambda: api.json.test_api.output(mock_test_results)) 1506 step_test_data=lambda: api.json.test_api.output(mock_test_results))
1507 1507
1508 1508
1509 ANDROID_INSTRUMENTATION_TARGET_MAP = {
1510 'AndroidWebViewTest': 'android_webview_test_apk',
1511 'ChromePublicTest': 'chrome_public_test_apk',
1512 'ChromeSyncShellTest': 'chrome_sync_shell_test_apk',
1513 'ChromotingTest': 'remoting_test_apk',
1514 'ContentShellTest': 'content_shell_test_apk',
1515 'MojoTest': 'mojo_test_apk',
1516 'SystemWebViewShellLayoutTest': 'system_webview_shell_layout_test_apk',
1517 }
1518
1519
1509 class AndroidInstrumentationTest(AndroidTest): 1520 class AndroidInstrumentationTest(AndroidTest):
1510 _DEFAULT_SUITES = { 1521 _DEFAULT_SUITES = {
1511 'AndroidWebViewTest': { 1522 'AndroidWebViewTest': {
1512 'compile_targets': ['android_webview_test_apk'],
1513 'isolate_file_path': 'android_webview/android_webview_test_apk.isolate', 1523 'isolate_file_path': 'android_webview/android_webview_test_apk.isolate',
1514 'apk_under_test': 'AndroidWebView.apk', 1524 'apk_under_test': 'AndroidWebView.apk',
1515 'test_apk': 'AndroidWebViewTest.apk', 1525 'test_apk': 'AndroidWebViewTest.apk',
1516 }, 1526 },
1517 'ChromePublicTest': { 1527 'ChromePublicTest': {
1518 'compile_targets': ['chrome_public_test_apk'],
1519 'isolate_file_path': 'chrome/chrome_public_test_apk.isolate', 1528 'isolate_file_path': 'chrome/chrome_public_test_apk.isolate',
1520 'apk_under_test': 'ChromePublic.apk', 1529 'apk_under_test': 'ChromePublic.apk',
1521 'test_apk': 'ChromePublicTest.apk', 1530 'test_apk': 'ChromePublicTest.apk',
1522 'additional_apks': [ 1531 'additional_apks': [
1523 'ChromePublicTestSupport.apk', 1532 'ChromePublicTestSupport.apk',
1524 'ChromiumNetTestSupport.apk', 1533 'ChromiumNetTestSupport.apk',
1525 ], 1534 ],
1526 }, 1535 },
1527 'ChromeSyncShellTest': { 1536 'ChromeSyncShellTest': {
1528 'compile_targets': ['chrome_sync_shell_test_apk'],
1529 'isolate_file_path': None, 1537 'isolate_file_path': None,
1530 'apk_under_test': 'ChromeSyncShell.apk', 1538 'apk_under_test': 'ChromeSyncShell.apk',
1531 'test_apk': 'ChromeSyncShellTest.apk', 1539 'test_apk': 'ChromeSyncShellTest.apk',
1532 }, 1540 },
1533 'ChromotingTest': { 1541 'ChromotingTest': {
1534 'compile_targets': ['remoting_test_apk'],
1535 'isolate_file_path': None, 1542 'isolate_file_path': None,
1536 'apk_under_test': 'Chromoting.apk', 1543 'apk_under_test': 'Chromoting.apk',
1537 'test_apk': 'ChromotingTest.apk', 1544 'test_apk': 'ChromotingTest.apk',
1538 }, 1545 },
1539 'ContentShellTest': { 1546 'ContentShellTest': {
1540 'compile_targets': ['content_shell_test_apk'],
1541 'isolate_file_path': 'content/content_shell_test_apk.isolate', 1547 'isolate_file_path': 'content/content_shell_test_apk.isolate',
1542 'apk_under_test': 'ContentShell.apk', 1548 'apk_under_test': 'ContentShell.apk',
1543 'test_apk': 'ContentShellTest.apk', 1549 'test_apk': 'ContentShellTest.apk',
1544 }, 1550 },
1545 'SystemWebViewShellLayoutTest': { 1551 'SystemWebViewShellLayoutTest': {
1546 'compile_targets': ['system_webview_apk', 1552 'extra_compile_targets': ['system_webview_apk',
bpastene 2016/02/09 07:04:21 What makes these 'extra'? What's the point of desi
1547 'system_webview_shell_apk', 1553 'system_webview_shell_apk',
1548 'system_webview_shell_layout_test_apk', 1554 'android_tools'],
1549 'android_tools'],
1550 'isolate_file_path': ('android_webview/' 1555 'isolate_file_path': ('android_webview/'
1551 'system_webview_shell_test_apk.isolate'), 1556 'system_webview_shell_test_apk.isolate'),
1552 'apk_under_test': 'SystemWebViewShell.apk', 1557 'apk_under_test': 'SystemWebViewShell.apk',
1553 'test_apk': 'SystemWebViewShellLayoutTest.apk', 1558 'test_apk': 'SystemWebViewShellLayoutTest.apk',
1554 'additional_apks': ['SystemWebView.apk'], 1559 'additional_apks': ['SystemWebView.apk'],
1555 }, 1560 },
1556 'MojoTest': { 1561 'MojoTest': {
1557 'compile_targets': ['mojo_test_apk'],
1558 'isolate_file_path': None, 1562 'isolate_file_path': None,
1559 'apk_under_test': None, 1563 'apk_under_test': None,
1560 'test_apk': 'MojoTest.apk', 1564 'test_apk': 'MojoTest.apk',
1561 } 1565 }
1562 } 1566 }
1563 1567
1564 def __init__(self, name, compile_targets=None, apk_under_test=None, 1568 def __init__(self, name, compile_targets=None, apk_under_test=None,
1565 test_apk=None, isolate_file_path=None, timeout_scale=None, 1569 test_apk=None, isolate_file_path=None, timeout_scale=None,
1566 flakiness_dashboard='test-results.appspot.com', 1570 flakiness_dashboard='test-results.appspot.com',
1567 annotation=None, except_annotation=None, screenshot=False, 1571 annotation=None, except_annotation=None, screenshot=False,
1568 verbose=True, tool=None, host_driven_root=None, 1572 verbose=True, tool=None, host_driven_root=None,
1569 additional_apks=None): 1573 additional_apks=None):
1570 suite_defaults = AndroidInstrumentationTest._DEFAULT_SUITES.get(name, {}) 1574 suite_defaults = AndroidInstrumentationTest._DEFAULT_SUITES.get(name, {})
1575 if not compile_targets:
1576 compile_targets = []
1577 main_target = ANDROID_INSTRUMENTATION_TARGET_MAP.get(name)
1578 if main_target:
1579 compile_targets.append(main_target)
1580 compile_targets.extend(suite_defaults.get('extra_compile_targets', []))
1581
1571 super(AndroidInstrumentationTest, self).__init__( 1582 super(AndroidInstrumentationTest, self).__init__(
1572 name, 1583 name,
1573 compile_targets or suite_defaults.get('compile_targets'), 1584 compile_targets,
1574 isolate_file_path or suite_defaults.get('isolate_file_path')) 1585 isolate_file_path or suite_defaults.get('isolate_file_path'))
1575 self._additional_apks = ( 1586 self._additional_apks = (
1576 additional_apks or suite_defaults.get('additional_apks')) 1587 additional_apks or suite_defaults.get('additional_apks'))
1577 self._annotation = annotation 1588 self._annotation = annotation
1578 self._apk_under_test = ( 1589 self._apk_under_test = (
1579 apk_under_test or suite_defaults.get('apk_under_test')) 1590 apk_under_test or suite_defaults.get('apk_under_test'))
1580 self._except_annotation = except_annotation 1591 self._except_annotation = except_annotation
1581 self._flakiness_dashboard = flakiness_dashboard 1592 self._flakiness_dashboard = flakiness_dashboard
1582 self._host_driven_root = host_driven_root 1593 self._host_driven_root = host_driven_root
1583 self._screenshot = screenshot 1594 self._screenshot = screenshot
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1795 def run(self, api, suffix, test_filter=None): 1806 def run(self, api, suffix, test_filter=None):
1796 api.chromium_android.coverage_report(upload=False) 1807 api.chromium_android.coverage_report(upload=False)
1797 api.chromium_android.get_changed_lines_for_revision() 1808 api.chromium_android.get_changed_lines_for_revision()
1798 api.chromium_android.incremental_coverage_report() 1809 api.chromium_android.incremental_coverage_report()
1799 1810
1800 1811
1801 GOMA_TESTS = [ 1812 GOMA_TESTS = [
1802 GTestTest('base_unittests'), 1813 GTestTest('base_unittests'),
1803 GTestTest('content_unittests'), 1814 GTestTest('content_unittests'),
1804 ] 1815 ]
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698