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

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

Issue 176883023: Revert "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: 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) => [];
81 } 79 }
82 80
83 /// The 'none' runtime configuration. 81 /// The 'none' runtime configuration.
84 class NoneRuntimeConfiguration extends RuntimeConfiguration { 82 class NoneRuntimeConfiguration extends RuntimeConfiguration {
85 NoneRuntimeConfiguration() 83 NoneRuntimeConfiguration()
86 : super._subclass(); 84 : super._subclass();
87 85
88 List<Command> computeRuntimeCommands( 86 List<Command> computeRuntimeCommands(
89 TestSuite suite, 87 TestSuite suite,
90 CommandBuilder commandBuilder, 88 CommandBuilder commandBuilder,
(...skipping 28 matching lines...) Expand all
119 CommandBuilder commandBuilder, 117 CommandBuilder commandBuilder,
120 CommandArtifact artifact, 118 CommandArtifact artifact,
121 List<String> arguments, 119 List<String> arguments,
122 Map<String, String> environmentOverrides) { 120 Map<String, String> environmentOverrides) {
123 // TODO(ahe): Avoid duplication of this method between d8 and jsshell. 121 // TODO(ahe): Avoid duplication of this method between d8 and jsshell.
124 checkArtifact(artifact); 122 checkArtifact(artifact);
125 return <Command>[ 123 return <Command>[
126 commandBuilder.getJSCommandlineCommand( 124 commandBuilder.getJSCommandlineCommand(
127 moniker, suite.d8FileName, arguments, environmentOverrides)]; 125 moniker, suite.d8FileName, arguments, environmentOverrides)];
128 } 126 }
129
130 List<String> dart2jsPreambles(Uri preambleDir) {
131 return [preambleDir.resolve('d8.js').toFilePath()];
132 }
133 } 127 }
134 128
135 /// Firefox/SpiderMonkey-based development shell (jsshell). 129 /// Firefox/SpiderMonkey-based development shell (jsshell).
136 class JsshellRuntimeConfiguration extends CommandLineJavaScriptRuntime { 130 class JsshellRuntimeConfiguration extends CommandLineJavaScriptRuntime {
137 JsshellRuntimeConfiguration() 131 JsshellRuntimeConfiguration()
138 : super('jsshell'); 132 : super('jsshell');
139 133
140 List<Command> computeRuntimeCommands( 134 List<Command> computeRuntimeCommands(
141 TestSuite suite, 135 TestSuite suite,
142 CommandBuilder commandBuilder, 136 CommandBuilder commandBuilder,
143 CommandArtifact artifact, 137 CommandArtifact artifact,
144 List<String> arguments, 138 List<String> arguments,
145 Map<String, String> environmentOverrides) { 139 Map<String, String> environmentOverrides) {
146 checkArtifact(artifact); 140 checkArtifact(artifact);
147 return <Command>[ 141 return <Command>[
148 commandBuilder.getJSCommandlineCommand( 142 commandBuilder.getJSCommandlineCommand(
149 moniker, suite.jsShellFileName, arguments, environmentOverrides)]; 143 moniker, suite.jsShellFileName, arguments, environmentOverrides)];
150 } 144 }
151
152 List<String> dart2jsPreambles(Uri preambleDir) {
153 return ['-f', preambleDir.resolve('jsshell.js').toFilePath(), '-f'];
154 }
155 } 145 }
156 146
157 /// Common runtime configuration for runtimes based on the Dart VM. 147 /// Common runtime configuration for runtimes based on the Dart VM.
158 class DartVmRuntimeConfiguration extends RuntimeConfiguration { 148 class DartVmRuntimeConfiguration extends RuntimeConfiguration {
159 DartVmRuntimeConfiguration() 149 DartVmRuntimeConfiguration()
160 : super._subclass(); 150 : super._subclass();
161 151
162 int computeTimeoutMultiplier({ 152 int computeTimeoutMultiplier({
163 bool isDebug: false, 153 bool isDebug: false,
164 bool isChecked: false, 154 bool isChecked: false,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { 209 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration {
220 List<Command> computeRuntimeCommands( 210 List<Command> computeRuntimeCommands(
221 TestSuite suite, 211 TestSuite suite,
222 CommandBuilder commandBuilder, 212 CommandBuilder commandBuilder,
223 CommandArtifact artifact, 213 CommandArtifact artifact,
224 List<String> arguments, 214 List<String> arguments,
225 Map<String, String> environmentOverrides) { 215 Map<String, String> environmentOverrides) {
226 throw "Unimplemented runtime '$runtimeType'"; 216 throw "Unimplemented runtime '$runtimeType'";
227 } 217 }
228 } 218 }
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