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

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

Issue 1855663002: Make android's run_instrumentation_suite() use generated wrapper scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@wrapper-1
Patch Set: Created 4 years, 8 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, enable_swarming=enable_swarming)) 10 tests.append(WebRTCTest(test, revision, enable_swarming=enable_swarming))
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 def run(self, api, suffix): 130 def run(self, api, suffix):
131 api.m.chromium_android.run_test_suite(self._name, 131 api.m.chromium_android.run_test_suite(self._name,
132 tool=get_android_tool(api), 132 tool=get_android_tool(api),
133 shard_timeout=self._SHARD_TIMEOUT) 133 shard_timeout=self._SHARD_TIMEOUT)
134 134
135 135
136 class AndroidInstrumentationTest(Test): 136 class AndroidInstrumentationTest(Test):
137 """Installs the APK on the device and runs the test.""" 137 """Installs the APK on the device and runs the test."""
138 def __init__(self, name, test_config): 138 def __init__(self, name, test_config):
139 super(AndroidInstrumentationTest, self).__init__(name) 139 super(AndroidInstrumentationTest, self).__init__(name)
140 self._apk_under_test = test_config.get('apk_under_test')
141 self._test_apk = test_config.get('test_apk')
142 140
143 def run(self, api, suffix): 141 def run(self, api, suffix):
144 api.m.chromium_android.run_instrumentation_suite( 142 api.m.chromium_android.run_instrumentation_suite(
145 name=self._name, 143 name=self._name,
146 apk_under_test=api.m.chromium_android.apk_path(self._apk_under_test),
147 test_apk=api.m.chromium_android.apk_path(self._test_apk),
148 tool=get_android_tool(api), 144 tool=get_android_tool(api),
149 verbose=True) 145 verbose=True)
150 146
151 147
152 class AndroidPerfTest(Test): 148 class AndroidPerfTest(Test):
153 """A performance test to run on Android devices. 149 """A performance test to run on Android devices.
154 150
155 Basically just wrap what happens in chromium_android.run_test_suite to run 151 Basically just wrap what happens in chromium_android.run_test_suite to run
156 inside runtest.py so we can scrape perf data. This way we can get perf data 152 inside runtest.py so we can scrape perf data. This way we can get perf data
157 from the gtest binaries since the way of running perf tests with telemetry 153 from the gtest binaries since the way of running perf tests with telemetry
(...skipping 19 matching lines...) Expand all
177 args = ['gtest', '-s', self._name, '--verbose', '--release', 173 args = ['gtest', '-s', self._name, '--verbose', '--release',
178 '-t', str(self._SHARD_TIMEOUT)] 174 '-t', str(self._SHARD_TIMEOUT)]
179 tool = get_android_tool(api) 175 tool = get_android_tool(api)
180 api.add_test(name=self._name, 176 api.add_test(name=self._name,
181 test=api.m.chromium_android.c.test_runner, 177 test=api.m.chromium_android.c.test_runner,
182 args=args, 178 args=args,
183 revision=self._revision, 179 revision=self._revision,
184 perf_test=True, 180 perf_test=True,
185 perf_dashboard_id=self._name) 181 perf_dashboard_id=self._name)
186 182
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698