| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 | 5 |
| 6 def generate_tests(api, test_suite, revision, enable_swarming=False): | 6 def generate_tests(api, test_suite, revision, enable_swarming=False): |
| 7 tests = [] | 7 tests = [] |
| 8 if test_suite == 'webrtc': | 8 if test_suite == 'webrtc': |
| 9 for test in api.NORMAL_TESTS: | 9 for test in api.NORMAL_TESTS: |
| 10 tests.append(WebRTCTest(test, revision, enable_swarming=enable_swarming)) | 10 tests.append(WebRTCTest(test, revision, |
| 11 enable_swarming=enable_swarming)) |
| 11 tests.append(WebRTCTest('webrtc_nonparallel_tests', revision, | 12 tests.append(WebRTCTest('webrtc_nonparallel_tests', revision, |
| 12 parallel=False, enable_swarming=False)) | 13 parallel=False, |
| 14 enable_swarming=False)) |
| 13 elif test_suite == 'webrtc_baremetal': | 15 elif test_suite == 'webrtc_baremetal': |
| 14 if api.m.platform.is_linux: | 16 if api.m.platform.is_linux: |
| 15 f = api.m.path['checkout'].join | 17 f = api.m.path['checkout'].join |
| 16 tests.extend([ | 18 tests.extend([ |
| 17 BaremetalTest('audioproc', | 19 BaremetalTest('audioproc', |
| 18 revision, | 20 revision, |
| 19 args=['-aecm', '-ns', '-agc', '--fixed_digital', | 21 args=['-aecm', '-ns', '-agc', '--fixed_digital', |
| 20 '--perf', '-pb', | 22 '--perf', '-pb', |
| 21 f('resources', 'audioproc.aecdump')], | 23 f('resources', 'audioproc.aecdump')], |
| 22 perf_test=True), | 24 perf_test=True), |
| (...skipping 10 matching lines...) Expand all Loading... |
| 33 # http://crbug.com/589101 | 35 # http://crbug.com/589101 |
| 34 if api.m.platform.is_mac or api.m.platform.is_win: | 36 if api.m.platform.is_mac or api.m.platform.is_win: |
| 35 tests.append(BaremetalTest('audio_device_tests', revision)) | 37 tests.append(BaremetalTest('audio_device_tests', revision)) |
| 36 | 38 |
| 37 tests.extend([ | 39 tests.extend([ |
| 38 BaremetalTest('voe_auto_test', revision, args=['--automated']), | 40 BaremetalTest('voe_auto_test', revision, args=['--automated']), |
| 39 BaremetalTest('video_capture_tests', revision), | 41 BaremetalTest('video_capture_tests', revision), |
| 40 ]) | 42 ]) |
| 41 if not api.m.tryserver.is_tryserver: | 43 if not api.m.tryserver.is_tryserver: |
| 42 tests.append(BaremetalTest('webrtc_perf_tests', revision, perf_test=True)) | 44 tests.append(BaremetalTest('webrtc_perf_tests', revision, perf_test=True)) |
| 43 if test_suite in ('android_device', 'android_swarming'): | 45 |
| 44 for test in api.ANDROID_DEVICE_TESTS: | 46 elif test_suite == 'android': |
| 47 for test in api.ANDROID_APK_TESTS: |
| 45 tests.append(AndroidTest(test, enable_swarming)) | 48 tests.append(AndroidTest(test, enable_swarming)) |
| 46 if (not api.m.tryserver.is_tryserver and api.c.PERF_ID and | 49 if (not api.m.tryserver.is_tryserver and api.c.PERF_ID and |
| 47 api.m.chromium.c.BUILD_CONFIG == 'Release'): | 50 api.m.chromium.c.BUILD_CONFIG == 'Release'): |
| 48 tests.append(AndroidPerfTest('webrtc_perf_tests', revision, | 51 tests.append(AndroidPerfTest('webrtc_perf_tests', revision, |
| 49 perf_id=api.c.PERF_ID)) | 52 perf_id=api.c.PERF_ID)) |
| 50 for test_name in api.ANDROID_INSTRUMENTATION_TESTS: | 53 for test_name in api.ANDROID_INSTRUMENTATION_TESTS: |
| 51 tests.append(AndroidInstrumentationTest(test_name, enable_swarming)) | 54 tests.append(AndroidInstrumentationTest(test_name, enable_swarming)) |
| 52 if test_suite in ('android_linux', 'android_swarming'): | |
| 53 for test in api.ANDROID_LINUX_TESTS: | |
| 54 tests.append(AndroidTest(test, enable_swarming)) | |
| 55 | 55 |
| 56 return tests | 56 return tests |
| 57 | 57 |
| 58 | 58 |
| 59 # TODO(kjellander): Continue refactoring an integrate the classes in the | 59 # TODO(kjellander): Continue refactoring an integrate the classes in the |
| 60 # chromium_tests recipe module instead (if possible). | 60 # chromium_tests recipe module instead (if possible). |
| 61 class Test(object): | 61 class Test(object): |
| 62 def __init__(self, name, enable_swarming=False): | 62 def __init__(self, name, enable_swarming=False): |
| 63 self._name = name | 63 self._name = name |
| 64 self._enable_swarming = enable_swarming | 64 self._enable_swarming = enable_swarming |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 'run_%s' % self._name) | 163 'run_%s' % self._name) |
| 164 args = ['--verbose'] | 164 args = ['--verbose'] |
| 165 api.add_test(name=self._name, | 165 api.add_test(name=self._name, |
| 166 test=wrapper_script, | 166 test=wrapper_script, |
| 167 args=args, | 167 args=args, |
| 168 revision=self._revision, | 168 revision=self._revision, |
| 169 python_mode=True, | 169 python_mode=True, |
| 170 perf_test=True, | 170 perf_test=True, |
| 171 perf_dashboard_id=self._name) | 171 perf_dashboard_id=self._name) |
| 172 | 172 |
| OLD | NEW |