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

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

Issue 1882293003: 🐎 Remove --shard-timeout from webrtc recipes now that they are in wrapper scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@wrapper-3
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
« no previous file with comments | « no previous file | scripts/slave/recipes/webrtc/standalone.expected/client_webrtc_android32_tests__l_nexus5_.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 perf_test=perf_test, **runtest_kwargs) 113 perf_test=perf_test, **runtest_kwargs)
114 114
115 115
116 def get_android_tool(api): 116 def get_android_tool(api):
117 if api.m.chromium.c.gyp_env.GYP_DEFINES.get('asan', 0) == 1: 117 if api.m.chromium.c.gyp_env.GYP_DEFINES.get('asan', 0) == 1:
118 return 'asan' 118 return 'asan'
119 return None 119 return None
120 120
121 121
122 class AndroidTest(Test): 122 class AndroidTest(Test):
123 # WebRTC tests need a longer timeout to avoid getting killed by the Chromium
124 # Android test framework.
125 _SHARD_TIMEOUT = 15 * 60
126
127 def __init__(self, name):
128 super(AndroidTest, self).__init__(name)
129
130 def run(self, api, suffix): 123 def run(self, api, suffix):
131 api.m.chromium_android.run_test_suite(self._name, 124 api.m.chromium_android.run_test_suite(self._name,
132 tool=get_android_tool(api), 125 tool=get_android_tool(api))
133 shard_timeout=self._SHARD_TIMEOUT)
134 126
135 127
136 class AndroidInstrumentationTest(Test): 128 class AndroidInstrumentationTest(Test):
137 """Installs the APK on the device and runs the test.""" 129 """Installs the APK on the device and runs the test."""
138 130
139 def run(self, api, suffix): 131 def run(self, api, suffix):
140 api.m.chromium_android.run_instrumentation_suite( 132 api.m.chromium_android.run_instrumentation_suite(
141 name=self._name, 133 name=self._name,
142 wrapper_script_suite_name=self._name, 134 wrapper_script_suite_name=self._name,
143 tool=get_android_tool(api), 135 tool=get_android_tool(api),
144 verbose=True) 136 verbose=True)
145 137
146 138
147 class AndroidPerfTest(Test): 139 class AndroidPerfTest(Test):
148 """A performance test to run on Android devices. 140 """A performance test to run on Android devices.
149 141
150 Basically just wrap what happens in chromium_android.run_test_suite to run 142 Basically just wrap what happens in chromium_android.run_test_suite to run
151 inside runtest.py so we can scrape perf data. This way we can get perf data 143 inside runtest.py so we can scrape perf data. This way we can get perf data
152 from the gtest binaries since the way of running perf tests with telemetry 144 from the gtest binaries since the way of running perf tests with telemetry
153 is entirely different. 145 is entirely different.
154 """ 146 """
155 # WebRTC tests need a longer timeout to avoid getting killed by the Chromium
156 # Android test framework.
157 _SHARD_TIMEOUT = 45 * 60
158 147
159 def __init__(self, name, revision, perf_id=None): 148 def __init__(self, name, revision, perf_id=None):
160 super(AndroidPerfTest, self).__init__(name) 149 super(AndroidPerfTest, self).__init__(name)
161 self._revision = revision 150 self._revision = revision
162 self._perf_id = perf_id 151 self._perf_id = perf_id
163 152
164 def run(self, api, suffix): 153 def run(self, api, suffix):
165 if not self._perf_id or api.m.chromium.c.BUILD_CONFIG == 'Debug': 154 if not self._perf_id or api.m.chromium.c.BUILD_CONFIG == 'Debug':
166 # Run as a normal test for trybots and Debug, without perf data scraping. 155 # Run as a normal test for trybots and Debug, without perf data scraping.
167 api.m.chromium_android.run_test_suite( 156 api.m.chromium_android.run_test_suite(
168 self._name, 157 self._name,
169 tool=get_android_tool(api), 158 tool=get_android_tool(api))
170 shard_timeout=self._SHARD_TIMEOUT)
171 else: 159 else:
172 args = ['gtest', '-s', self._name, '--verbose', '--release', 160 wrapper_script = api.m.chromium.output_dir.join('bin',
173 '-t', str(self._SHARD_TIMEOUT)] 161 'run_%s' % self._name)
174 tool = get_android_tool(api) 162 args = ['--verbose']
175 api.add_test(name=self._name, 163 api.add_test(name=self._name,
176 test=api.m.chromium_android.c.test_runner, 164 test=wrapper_script,
177 args=args, 165 args=args,
178 revision=self._revision, 166 revision=self._revision,
179 perf_test=True, 167 perf_test=True,
180 perf_dashboard_id=self._name, 168 perf_dashboard_id=self._name)
181 env={'CHROMIUM_OUT_DIR': api.m.chromium.output_dir})
182 169
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/webrtc/standalone.expected/client_webrtc_android32_tests__l_nexus5_.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698