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

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

Issue 1663863002: Add product mode: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 7 import 'compiler_configuration.dart' show
8 CommandArtifact; 8 CommandArtifact;
9 9
10 // TODO(ahe): Remove this import, we can precompute all the values required 10 // TODO(ahe): Remove this import, we can precompute all the values required
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return new DrtRuntimeConfiguration(); 59 return new DrtRuntimeConfiguration();
60 60
61 default: 61 default:
62 throw "Unknown runtime '$runtime'"; 62 throw "Unknown runtime '$runtime'";
63 } 63 }
64 } 64 }
65 65
66 RuntimeConfiguration._subclass(); 66 RuntimeConfiguration._subclass();
67 67
68 int computeTimeoutMultiplier({ 68 int computeTimeoutMultiplier({
69 bool isDebug: false, 69 String mode,
70 bool isChecked: false, 70 bool isChecked: false,
71 String arch}) { 71 String arch}) {
72 return 1; 72 return 1;
73 } 73 }
74 74
75 List<Command> computeRuntimeCommands( 75 List<Command> computeRuntimeCommands(
76 TestSuite suite, 76 TestSuite suite,
77 CommandBuilder commandBuilder, 77 CommandBuilder commandBuilder,
78 CommandArtifact artifact, 78 CommandArtifact artifact,
79 List<String> arguments, 79 List<String> arguments,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
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() 164 DartVmRuntimeConfiguration()
165 : super._subclass(); 165 : super._subclass();
166 166
167 int computeTimeoutMultiplier({ 167 int computeTimeoutMultiplier({
168 bool isDebug: false, 168 String mode,
169 bool isChecked: false, 169 bool isChecked: false,
170 String arch}) { 170 String arch}) {
171 int multiplier = 1; 171 int multiplier = 1;
172 switch (arch) { 172 switch (arch) {
173 case 'simarm': 173 case 'simarm':
174 case 'arm': 174 case 'arm':
175 case 'simarmv6': 175 case 'simarmv6':
176 case 'armv6': 176 case 'armv6':
177 case' simarmv5te': 177 case' simarmv5te':
178 case 'armv5te': 178 case 'armv5te':
179 case 'simmips': 179 case 'simmips':
180 case 'mips': 180 case 'mips':
181 case 'simarm64': 181 case 'simarm64':
182 multiplier *= 4; 182 multiplier *= 4;
183 break; 183 break;
184 } 184 }
185 if (isDebug) { 185 if (mode == 'debug') {
186 multiplier *= 2; 186 multiplier *= 2;
187 } 187 }
188 return multiplier; 188 return multiplier;
189 } 189 }
190 } 190 }
191 191
192 /// Runtime configuration for Content Shell. We previously used a similar 192 /// Runtime configuration for Content Shell. We previously used a similar
193 /// program named Dump Render Tree, hence the name. 193 /// program named Dump Render Tree, hence the name.
194 class DrtRuntimeConfiguration extends DartVmRuntimeConfiguration { 194 class DrtRuntimeConfiguration extends DartVmRuntimeConfiguration {
195 int computeTimeoutMultiplier({ 195 int computeTimeoutMultiplier({
196 bool isDebug: false, 196 String mode,
197 bool isChecked: false, 197 bool isChecked: false,
198 String arch}) { 198 String arch}) {
199 return 4 // Allow additional time for browser testing to run. 199 return 4 // Allow additional time for browser testing to run.
200 // TODO(ahe): We might need to distinquish between DRT for running 200 // TODO(ahe): We might need to distinquish between DRT for running
201 // JavaScript and Dart code. I'm not convinced the inherited timeout 201 // JavaScript and Dart code. I'm not convinced the inherited timeout
202 // multiplier is relevant for JavaScript. 202 // multiplier is relevant for JavaScript.
203 * super.computeTimeoutMultiplier( 203 * super.computeTimeoutMultiplier(
204 isDebug: isDebug, isChecked: isChecked); 204 mode: mode, isChecked: isChecked);
205 } 205 }
206 } 206 }
207 207
208 /// The standalone Dart VM binary, "dart" or "dart.exe". 208 /// The standalone Dart VM binary, "dart" or "dart.exe".
209 class StandaloneDartRuntimeConfiguration extends DartVmRuntimeConfiguration { 209 class StandaloneDartRuntimeConfiguration extends DartVmRuntimeConfiguration {
210 List<Command> computeRuntimeCommands( 210 List<Command> computeRuntimeCommands(
211 TestSuite suite, 211 TestSuite suite,
212 CommandBuilder commandBuilder, 212 CommandBuilder commandBuilder,
213 CommandArtifact artifact, 213 CommandArtifact artifact,
214 List<String> arguments, 214 List<String> arguments,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { 255 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration {
256 List<Command> computeRuntimeCommands( 256 List<Command> computeRuntimeCommands(
257 TestSuite suite, 257 TestSuite suite,
258 CommandBuilder commandBuilder, 258 CommandBuilder commandBuilder,
259 CommandArtifact artifact, 259 CommandArtifact artifact,
260 List<String> arguments, 260 List<String> arguments,
261 Map<String, String> environmentOverrides) { 261 Map<String, String> environmentOverrides) {
262 throw "Unimplemented runtime '$runtimeType'"; 262 throw "Unimplemented runtime '$runtimeType'";
263 } 263 }
264 } 264 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698