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

Unified Diff: tools/testing/dart/compiler_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/lib/preambles/jsshell.js ('k') | tools/testing/dart/runtime_configuration.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/compiler_configuration.dart
diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
index abe30edf891a2f69a6b255c832b1807be4fff949..891a33bcf4b8e22fb38755613b631fa55ac126cf 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -16,7 +16,8 @@ import 'test_runner.dart' show
CompilationCommand;
import 'test_suite.dart' show
- TestInformation;
+ TestInformation,
+ TestUtils;
/// Grouping of a command with its expected result.
class CommandArtifact {
@@ -124,6 +125,7 @@ abstract class CompilerConfiguration {
List<String> computeRuntimeArguments(
RuntimeConfiguration runtimeConfiguration,
+ String buildDir,
TestInformation info,
List<String> vmOptions,
List<String> sharedOptions,
@@ -148,6 +150,7 @@ class NoneCompilerConfiguration extends CompilerConfiguration {
List<String> computeRuntimeArguments(
RuntimeConfiguration runtimeConfiguration,
+ String buildDir,
TestInformation info,
List<String> vmOptions,
List<String> sharedOptions,
@@ -176,7 +179,7 @@ class Dart2xCompilerConfiguration extends CompilerConfiguration {
isHostChecked: isHostChecked, useSdk: useSdk);
String computeCompilerPath(String buildDir) {
- var prefix = 'sdk/bin/';
+ var prefix = 'sdk/bin';
String suffix = executableScriptSuffix;
if (isHostChecked) {
// The script dart2js_developer is not included in the
@@ -262,6 +265,23 @@ class Dart2jsCompilerConfiguration extends Dart2xCompilerConfiguration {
isCsp ? cspOutput : normalOutput,
'application/javascript');
}
+
+ List<String> computeRuntimeArguments(
+ RuntimeConfiguration runtimeConfiguration,
+ String buildDir,
+ TestInformation info,
+ List<String> vmOptions,
+ List<String> sharedOptions,
+ List<String> originalArguments,
+ CommandArtifact artifact) {
+ Uri sdk = useSdk ?
+ nativeDirectoryToUri(buildDir).resolve('dart-sdk/') :
+ nativeDirectoryToUri(TestUtils.dartDir().toNativePath())
+ .resolve('sdk/');
+ Uri preambleDir = sdk.resolve('lib/_internal/lib/preambles/');
+ return runtimeConfiguration.dart2jsPreambles(preambleDir)
+ ..add(artifact.filename);
+ }
}
/// Configuration for dart2dart compiler.
@@ -298,6 +318,7 @@ class Dart2dartCompilerConfiguration extends Dart2xCompilerConfiguration {
List<String> computeRuntimeArguments(
RuntimeConfiguration runtimeConfiguration,
+ String buildDir,
TestInformation info,
List<String> vmOptions,
List<String> sharedOptions,
@@ -352,6 +373,7 @@ class AnalyzerCompilerConfiguration extends CompilerConfiguration {
List<String> computeRuntimeArguments(
RuntimeConfiguration runtimeConfiguration,
+ String buildDir,
TestInformation info,
List<String> vmOptions,
List<String> sharedOptions,
« no previous file with comments | « sdk/lib/_internal/lib/preambles/jsshell.js ('k') | tools/testing/dart/runtime_configuration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698