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

Side by Side Diff: tools/testing/dart/runtime_configuration.dart

Issue 2197653005: Increase test runtime timeout configuration for hot_reload tests in debug mode as we are about to a… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library runtime_configuration; 5 library runtime_configuration;
6 6
7 import 'compiler_configuration.dart' show CommandArtifact; 7 import 'compiler_configuration.dart' show CommandArtifact;
8 8
9 // TODO(ahe): Remove this import, we can precompute all the values required 9 // TODO(ahe): Remove this import, we can precompute all the values required
10 // from TestSuite once the refactoring is complete. 10 // from TestSuite once the refactoring is complete.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 return new DrtRuntimeConfiguration(); 63 return new DrtRuntimeConfiguration();
64 64
65 default: 65 default:
66 throw "Unknown runtime '$runtime'"; 66 throw "Unknown runtime '$runtime'";
67 } 67 }
68 } 68 }
69 69
70 RuntimeConfiguration._subclass(); 70 RuntimeConfiguration._subclass();
71 71
72 int computeTimeoutMultiplier( 72 int computeTimeoutMultiplier(
73 {String mode, bool isChecked: false, String arch}) { 73 {String mode, bool isChecked: false, bool isReload: false, String arch}) {
74 return 1; 74 return 1;
75 } 75 }
76 76
77 List<Command> computeRuntimeCommands( 77 List<Command> computeRuntimeCommands(
78 TestSuite suite, 78 TestSuite suite,
79 CommandBuilder commandBuilder, 79 CommandBuilder commandBuilder,
80 CommandArtifact artifact, 80 CommandArtifact artifact,
81 List<String> arguments, 81 List<String> arguments,
82 Map<String, String> environmentOverrides) { 82 Map<String, String> environmentOverrides) {
83 // TODO(ahe): Make this method abstract. 83 // TODO(ahe): Make this method abstract.
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 List<String> dart2jsPreambles(Uri preambleDir) { 157 List<String> dart2jsPreambles(Uri preambleDir) {
158 return ['-f', preambleDir.resolve('jsshell.js').toFilePath(), '-f']; 158 return ['-f', preambleDir.resolve('jsshell.js').toFilePath(), '-f'];
159 } 159 }
160 } 160 }
161 161
162 /// Common runtime configuration for runtimes based on the Dart VM. 162 /// Common runtime configuration for runtimes based on the Dart VM.
163 class DartVmRuntimeConfiguration extends RuntimeConfiguration { 163 class DartVmRuntimeConfiguration extends RuntimeConfiguration {
164 DartVmRuntimeConfiguration() : super._subclass(); 164 DartVmRuntimeConfiguration() : super._subclass();
165 165
166 int computeTimeoutMultiplier( 166 int computeTimeoutMultiplier(
167 {String mode, bool isChecked: false, String arch}) { 167 {String mode, bool isChecked: false, bool isReload: false, String arch}) {
168 int multiplier = 1; 168 int multiplier = 1;
169 switch (arch) { 169 switch (arch) {
170 case 'simarm': 170 case 'simarm':
171 case 'arm': 171 case 'arm':
172 case 'simarmv6': 172 case 'simarmv6':
173 case 'armv6': 173 case 'armv6':
174 case ' simarmv5te': 174 case ' simarmv5te':
175 case 'armv5te': 175 case 'armv5te':
176 case 'simmips': 176 case 'simmips':
177 case 'mips': 177 case 'mips':
178 case 'simarm64': 178 case 'simarm64':
179 case 'simdbc': 179 case 'simdbc':
180 case 'simdbc64': 180 case 'simdbc64':
181 multiplier *= 4; 181 multiplier *= 4;
182 break; 182 break;
183 } 183 }
184 if (mode == 'debug') { 184 if (mode == 'debug') {
185 multiplier *= 2; 185 multiplier *= 2;
186 if (isReload) {
187 multiplier *= 2;
188 }
186 } 189 }
187 return multiplier; 190 return multiplier;
188 } 191 }
189 } 192 }
190 193
191 /// Runtime configuration for Content Shell. We previously used a similar 194 /// Runtime configuration for Content Shell. We previously used a similar
192 /// program named Dump Render Tree, hence the name. 195 /// program named Dump Render Tree, hence the name.
193 class DrtRuntimeConfiguration extends DartVmRuntimeConfiguration { 196 class DrtRuntimeConfiguration extends DartVmRuntimeConfiguration {
194 int computeTimeoutMultiplier( 197 int computeTimeoutMultiplier(
195 {String mode, bool isChecked: false, String arch}) { 198 {String mode, bool isChecked: false, bool isReload: false, String arch}) {
196 return 4 // Allow additional time for browser testing to run. 199 return 4 // Allow additional time for browser testing to run.
197 // TODO(ahe): We might need to distinquish between DRT for running 200 // TODO(ahe): We might need to distinquish between DRT for running
198 // JavaScript and Dart code. I'm not convinced the inherited timeout 201 // JavaScript and Dart code. I'm not convinced the inherited timeout
199 // multiplier is relevant for JavaScript. 202 // multiplier is relevant for JavaScript.
200 * 203 *
201 super.computeTimeoutMultiplier(mode: mode, isChecked: isChecked); 204 super.computeTimeoutMultiplier(
205 mode: mode, isChecked: isChecked, isRelease: isReload);
202 } 206 }
203 } 207 }
204 208
205 /// The standalone Dart VM binary, "dart" or "dart.exe". 209 /// The standalone Dart VM binary, "dart" or "dart.exe".
206 class StandaloneDartRuntimeConfiguration extends DartVmRuntimeConfiguration { 210 class StandaloneDartRuntimeConfiguration extends DartVmRuntimeConfiguration {
207 List<Command> computeRuntimeCommands( 211 List<Command> computeRuntimeCommands(
208 TestSuite suite, 212 TestSuite suite,
209 CommandBuilder commandBuilder, 213 CommandBuilder commandBuilder,
210 CommandArtifact artifact, 214 CommandArtifact artifact,
211 List<String> arguments, 215 List<String> arguments,
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { 321 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration {
318 List<Command> computeRuntimeCommands( 322 List<Command> computeRuntimeCommands(
319 TestSuite suite, 323 TestSuite suite,
320 CommandBuilder commandBuilder, 324 CommandBuilder commandBuilder,
321 CommandArtifact artifact, 325 CommandArtifact artifact,
322 List<String> arguments, 326 List<String> arguments,
323 Map<String, String> environmentOverrides) { 327 Map<String, String> environmentOverrides) {
324 throw "Unimplemented runtime '$runtimeType'"; 328 throw "Unimplemented runtime '$runtimeType'";
325 } 329 }
326 } 330 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/test_options.dart » ('j') | tools/testing/dart/test_options.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698