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

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

Issue 2354363006: WebRTC: Add android_junit_tests. (Closed)
Patch Set: Rebase Created 4 years, 2 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
OLDNEW
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, 10 tests.append(WebRTCTest(test, revision, enable_swarming=enable_swarming))
11 enable_swarming=enable_swarming))
12 tests.append(WebRTCTest('webrtc_nonparallel_tests', revision, 11 tests.append(WebRTCTest('webrtc_nonparallel_tests', revision,
13 parallel=False, 12 parallel=False, enable_swarming=False))
14 enable_swarming=False))
15 elif test_suite == 'webrtc_baremetal': 13 elif test_suite == 'webrtc_baremetal':
16 if api.m.platform.is_linux: 14 if api.m.platform.is_linux:
17 f = api.m.path['checkout'].join 15 f = api.m.path['checkout'].join
18 tests.extend([ 16 tests.extend([
19 BaremetalTest('audioproc', 17 BaremetalTest('audioproc',
20 revision, 18 revision,
21 args=['-aecm', '-ns', '-agc', '--fixed_digital', 19 args=['-aecm', '-ns', '-agc', '--fixed_digital',
22 '--perf', '-pb', 20 '--perf', '-pb',
23 f('resources', 'audioproc.aecdump')], 21 f('resources', 'audioproc.aecdump')],
24 perf_test=True), 22 perf_test=True),
(...skipping 10 matching lines...) Expand all
35 # http://crbug.com/589101 33 # http://crbug.com/589101
36 if api.m.platform.is_mac or api.m.platform.is_win: 34 if api.m.platform.is_mac or api.m.platform.is_win:
37 tests.append(BaremetalTest('audio_device_tests', revision)) 35 tests.append(BaremetalTest('audio_device_tests', revision))
38 36
39 tests.extend([ 37 tests.extend([
40 BaremetalTest('voe_auto_test', revision, args=['--automated']), 38 BaremetalTest('voe_auto_test', revision, args=['--automated']),
41 BaremetalTest('video_capture_tests', revision), 39 BaremetalTest('video_capture_tests', revision),
42 ]) 40 ])
43 if not api.m.tryserver.is_tryserver: 41 if not api.m.tryserver.is_tryserver:
44 tests.append(BaremetalTest('webrtc_perf_tests', revision, perf_test=True)) 42 tests.append(BaremetalTest('webrtc_perf_tests', revision, perf_test=True))
45 43 if test_suite in ('android_device', 'android_swarming'):
46 elif test_suite == 'android': 44 for test in api.ANDROID_DEVICE_TESTS:
47 for test in api.ANDROID_APK_TESTS:
48 tests.append(AndroidTest(test, enable_swarming)) 45 tests.append(AndroidTest(test, enable_swarming))
49 if (not api.m.tryserver.is_tryserver and api.c.PERF_ID and 46 if (not api.m.tryserver.is_tryserver and api.c.PERF_ID and
50 api.m.chromium.c.BUILD_CONFIG == 'Release'): 47 api.m.chromium.c.BUILD_CONFIG == 'Release'):
51 tests.append(AndroidPerfTest('webrtc_perf_tests', revision, 48 tests.append(AndroidPerfTest('webrtc_perf_tests', revision,
52 perf_id=api.c.PERF_ID)) 49 perf_id=api.c.PERF_ID))
53 for test_name in api.ANDROID_INSTRUMENTATION_TESTS: 50 for test_name in api.ANDROID_INSTRUMENTATION_TESTS:
54 tests.append(AndroidInstrumentationTest(test_name, enable_swarming)) 51 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698