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

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

Issue 183743032: Reapply "Dart2js testing: Add prefix files when running dart2js output on d8 or jsshell."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Correctly break a string that is a long line. Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/compiler_configuration.dart ('k') | tools/testing/dart/test_suite.dart » ('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 (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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 List<Command> computeRuntimeCommands( 70 List<Command> computeRuntimeCommands(
71 TestSuite suite, 71 TestSuite suite,
72 CommandBuilder commandBuilder, 72 CommandBuilder commandBuilder,
73 CommandArtifact artifact, 73 CommandArtifact artifact,
74 List<String> arguments, 74 List<String> arguments,
75 Map<String, String> environmentOverrides) { 75 Map<String, String> environmentOverrides) {
76 // TODO(ahe): Make this method abstract. 76 // TODO(ahe): Make this method abstract.
77 throw "Unimplemented runtime '$runtimeType'"; 77 throw "Unimplemented runtime '$runtimeType'";
78 } 78 }
79
80 List<String> dart2jsPreambles(Uri preambleDir) => [];
79 } 81 }
80 82
81 /// The 'none' runtime configuration. 83 /// The 'none' runtime configuration.
82 class NoneRuntimeConfiguration extends RuntimeConfiguration { 84 class NoneRuntimeConfiguration extends RuntimeConfiguration {
83 NoneRuntimeConfiguration() 85 NoneRuntimeConfiguration()
84 : super._subclass(); 86 : super._subclass();
85 87
86 List<Command> computeRuntimeCommands( 88 List<Command> computeRuntimeCommands(
87 TestSuite suite, 89 TestSuite suite,
88 CommandBuilder commandBuilder, 90 CommandBuilder commandBuilder,
(...skipping 28 matching lines...) Expand all
117 CommandBuilder commandBuilder, 119 CommandBuilder commandBuilder,
118 CommandArtifact artifact, 120 CommandArtifact artifact,
119 List<String> arguments, 121 List<String> arguments,
120 Map<String, String> environmentOverrides) { 122 Map<String, String> environmentOverrides) {
121 // TODO(ahe): Avoid duplication of this method between d8 and jsshell. 123 // TODO(ahe): Avoid duplication of this method between d8 and jsshell.
122 checkArtifact(artifact); 124 checkArtifact(artifact);
123 return <Command>[ 125 return <Command>[
124 commandBuilder.getJSCommandlineCommand( 126 commandBuilder.getJSCommandlineCommand(
125 moniker, suite.d8FileName, arguments, environmentOverrides)]; 127 moniker, suite.d8FileName, arguments, environmentOverrides)];
126 } 128 }
129
130 List<String> dart2jsPreambles(Uri preambleDir) {
131 return [preambleDir.resolve('d8.js').toFilePath()];
132 }
127 } 133 }
128 134
129 /// Firefox/SpiderMonkey-based development shell (jsshell). 135 /// Firefox/SpiderMonkey-based development shell (jsshell).
130 class JsshellRuntimeConfiguration extends CommandLineJavaScriptRuntime { 136 class JsshellRuntimeConfiguration extends CommandLineJavaScriptRuntime {
131 JsshellRuntimeConfiguration() 137 JsshellRuntimeConfiguration()
132 : super('jsshell'); 138 : super('jsshell');
133 139
134 List<Command> computeRuntimeCommands( 140 List<Command> computeRuntimeCommands(
135 TestSuite suite, 141 TestSuite suite,
136 CommandBuilder commandBuilder, 142 CommandBuilder commandBuilder,
137 CommandArtifact artifact, 143 CommandArtifact artifact,
138 List<String> arguments, 144 List<String> arguments,
139 Map<String, String> environmentOverrides) { 145 Map<String, String> environmentOverrides) {
140 checkArtifact(artifact); 146 checkArtifact(artifact);
141 return <Command>[ 147 return <Command>[
142 commandBuilder.getJSCommandlineCommand( 148 commandBuilder.getJSCommandlineCommand(
143 moniker, suite.jsShellFileName, arguments, environmentOverrides)]; 149 moniker, suite.jsShellFileName, arguments, environmentOverrides)];
144 } 150 }
151
152 List<String> dart2jsPreambles(Uri preambleDir) {
153 return ['-f', preambleDir.resolve('jsshell.js').toFilePath(), '-f'];
154 }
145 } 155 }
146 156
147 /// Common runtime configuration for runtimes based on the Dart VM. 157 /// Common runtime configuration for runtimes based on the Dart VM.
148 class DartVmRuntimeConfiguration extends RuntimeConfiguration { 158 class DartVmRuntimeConfiguration extends RuntimeConfiguration {
149 DartVmRuntimeConfiguration() 159 DartVmRuntimeConfiguration()
150 : super._subclass(); 160 : super._subclass();
151 161
152 int computeTimeoutMultiplier({ 162 int computeTimeoutMultiplier({
153 bool isDebug: false, 163 bool isDebug: false,
154 bool isChecked: false, 164 bool isChecked: false,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { 219 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration {
210 List<Command> computeRuntimeCommands( 220 List<Command> computeRuntimeCommands(
211 TestSuite suite, 221 TestSuite suite,
212 CommandBuilder commandBuilder, 222 CommandBuilder commandBuilder,
213 CommandArtifact artifact, 223 CommandArtifact artifact,
214 List<String> arguments, 224 List<String> arguments,
215 Map<String, String> environmentOverrides) { 225 Map<String, String> environmentOverrides) {
216 throw "Unimplemented runtime '$runtimeType'"; 226 throw "Unimplemented runtime '$runtimeType'";
217 } 227 }
218 } 228 }
OLDNEW
« no previous file with comments | « tools/testing/dart/compiler_configuration.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698