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

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

Issue 1913103002: Revert of 🐎 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
123 def run(self, api, suffix): 130 def run(self, api, suffix):
124 api.m.chromium_android.run_test_suite(self._name, 131 api.m.chromium_android.run_test_suite(self._name,
125 tool=get_android_tool(api)) 132 tool=get_android_tool(api),
133 shard_timeout=self._SHARD_TIMEOUT)
126 134
127 135
128 class AndroidInstrumentationTest(Test): 136 class AndroidInstrumentationTest(Test):
129 """Installs the APK on the device and runs the test.""" 137 """Installs the APK on the device and runs the test."""
130 138
131 def run(self, api, suffix): 139 def run(self, api, suffix):
132 api.m.chromium_android.run_instrumentation_suite( 140 api.m.chromium_android.run_instrumentation_suite(
133 name=self._name, 141 name=self._name,
134 wrapper_script_suite_name=self._name, 142 wrapper_script_suite_name=self._name,
135 tool=get_android_tool(api), 143 tool=get_android_tool(api),
136 verbose=True) 144 verbose=True)
137 145
138 146
139 class AndroidPerfTest(Test): 147 class AndroidPerfTest(Test):
140 """A performance test to run on Android devices. 148 """A performance test to run on Android devices.
141 149
142 Basically just wrap what happens in chromium_android.run_test_suite to run 150 Basically just wrap what happens in chromium_android.run_test_suite to run
143 inside runtest.py so we can scrape perf data. This way we can get perf data 151 inside runtest.py so we can scrape perf data. This way we can get perf data
144 from the gtest binaries since the way of running perf tests with telemetry 152 from the gtest binaries since the way of running perf tests with telemetry
145 is entirely different. 153 is entirely different.
146 """ 154 """
155 # WebRTC tests need a longer timeout to avoid getting killed by the Chromium
156 # Android test framework.
157 _SHARD_TIMEOUT = 45 * 60
147 158
148 def __init__(self, name, revision, perf_id=None): 159 def __init__(self, name, revision, perf_id=None):
149 super(AndroidPerfTest, self).__init__(name) 160 super(AndroidPerfTest, self).__init__(name)
150 self._revision = revision 161 self._revision = revision
151 self._perf_id = perf_id 162 self._perf_id = perf_id
152 163
153 def run(self, api, suffix): 164 def run(self, api, suffix):
154 if not self._perf_id or api.m.chromium.c.BUILD_CONFIG == 'Debug': 165 if not self._perf_id or api.m.chromium.c.BUILD_CONFIG == 'Debug':
155 # Run as a normal test for trybots and Debug, without perf data scraping. 166 # Run as a normal test for trybots and Debug, without perf data scraping.
156 api.m.chromium_android.run_test_suite( 167 api.m.chromium_android.run_test_suite(
157 self._name, 168 self._name,
158 tool=get_android_tool(api)) 169 tool=get_android_tool(api),
170 shard_timeout=self._SHARD_TIMEOUT)
159 else: 171 else:
160 wrapper_script = api.m.chromium.output_dir.join('bin', 172 args = ['gtest', '-s', self._name, '--verbose', '--release',
161 'run_%s' % self._name) 173 '-t', str(self._SHARD_TIMEOUT)]
162 args = ['--verbose'] 174 tool = get_android_tool(api)
163 api.add_test(name=self._name, 175 api.add_test(name=self._name,
164 test=wrapper_script, 176 test=api.m.chromium_android.c.test_runner,
165 args=args, 177 args=args,
166 revision=self._revision, 178 revision=self._revision,
167 perf_test=True, 179 perf_test=True,
168 perf_dashboard_id=self._name) 180 perf_dashboard_id=self._name,
181 env={'CHROMIUM_OUT_DIR': api.m.chromium.output_dir})
169 182
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