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

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

Issue 2354363006: WebRTC: Add android_junit_tests. (Closed)
Patch Set: Add swarming testcase. Created 4 years, 3 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
9 for test in api.additional_tests.get('webrtc_tests', []):
ehmaldonado_chromium 2016/09/23 09:45:10 Maybe have just one of these for now?
10 tests.append(WebRTCTest(test, revision, enable_swarming=enable_swarming))
11 for test in api.additional_tests.get('android_tests', []):
12 tests.append(AndroidTest(test, enable_swarming))
13 for test in api.additional_tests.get('android_perf_tests', []):
14 tests.append(AndroidPerfTest('webrtc_perf_tests', revision,
15 perf_id=api.c.PERF_ID))
16 for test in api.additional_tests.get('android_instrumentation_tests', []):
17 tests.append(AndroidInstrumentationTest(test_name, enable_swarming))
18
8 if test_suite == 'webrtc': 19 if test_suite == 'webrtc':
9 for test in api.NORMAL_TESTS: 20 for test in api.NORMAL_TESTS:
10 tests.append(WebRTCTest(test, revision, 21 tests.append(WebRTCTest(test, revision, enable_swarming=enable_swarming))
11 enable_swarming=enable_swarming))
12 tests.append(WebRTCTest('webrtc_nonparallel_tests', revision, 22 tests.append(WebRTCTest('webrtc_nonparallel_tests', revision,
13 parallel=False, 23 parallel=False, enable_swarming=False))
14 enable_swarming=False))
15 elif test_suite == 'webrtc_baremetal': 24 elif test_suite == 'webrtc_baremetal':
16 if api.m.platform.is_linux: 25 if api.m.platform.is_linux:
17 f = api.m.path['checkout'].join 26 f = api.m.path['checkout'].join
18 tests.extend([ 27 tests.extend([
19 BaremetalTest('audioproc', 28 BaremetalTest('audioproc',
20 revision, 29 revision,
21 args=['-aecm', '-ns', '-agc', '--fixed_digital', 30 args=['-aecm', '-ns', '-agc', '--fixed_digital',
22 '--perf', '-pb', 31 '--perf', '-pb',
23 f('resources', 'audioproc.aecdump')], 32 f('resources', 'audioproc.aecdump')],
24 perf_test=True), 33 perf_test=True),
(...skipping 20 matching lines...) Expand all
45 54
46 elif test_suite == 'android': 55 elif test_suite == 'android':
47 for test in api.ANDROID_APK_TESTS: 56 for test in api.ANDROID_APK_TESTS:
48 tests.append(AndroidTest(test, enable_swarming)) 57 tests.append(AndroidTest(test, enable_swarming))
49 if (not api.m.tryserver.is_tryserver and api.c.PERF_ID and 58 if (not api.m.tryserver.is_tryserver and api.c.PERF_ID and
50 api.m.chromium.c.BUILD_CONFIG == 'Release'): 59 api.m.chromium.c.BUILD_CONFIG == 'Release'):
51 tests.append(AndroidPerfTest('webrtc_perf_tests', revision, 60 tests.append(AndroidPerfTest('webrtc_perf_tests', revision,
52 perf_id=api.c.PERF_ID)) 61 perf_id=api.c.PERF_ID))
53 for test_name in api.ANDROID_INSTRUMENTATION_TESTS: 62 for test_name in api.ANDROID_INSTRUMENTATION_TESTS:
54 tests.append(AndroidInstrumentationTest(test_name, enable_swarming)) 63 tests.append(AndroidInstrumentationTest(test_name, enable_swarming))
55 64
kjellander_chromium 2016/09/23 19:24:25 Then just add this here (inside test_suite == 'and
56 return tests 65 return tests
57 66
58 67
59 # TODO(kjellander): Continue refactoring an integrate the classes in the 68 # TODO(kjellander): Continue refactoring an integrate the classes in the
60 # chromium_tests recipe module instead (if possible). 69 # chromium_tests recipe module instead (if possible).
61 class Test(object): 70 class Test(object):
62 def __init__(self, name, enable_swarming=False): 71 def __init__(self, name, enable_swarming=False):
63 self._name = name 72 self._name = name
64 self._enable_swarming = enable_swarming 73 self._enable_swarming = enable_swarming
65 self._swarming_task = None 74 self._swarming_task = None
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 'run_%s' % self._name) 172 'run_%s' % self._name)
164 args = ['--verbose'] 173 args = ['--verbose']
165 api.add_test(name=self._name, 174 api.add_test(name=self._name,
166 test=wrapper_script, 175 test=wrapper_script,
167 args=args, 176 args=args,
168 revision=self._revision, 177 revision=self._revision,
169 python_mode=True, 178 python_mode=True,
170 perf_test=True, 179 perf_test=True,
171 perf_dashboard_id=self._name) 180 perf_dashboard_id=self._name)
172 181
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698