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

Unified Diff: tools/testing/dart/test_suite.dart

Issue 11593008: Enable the "skip command compilation if output is already up-to-date" feature in dart2dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 64aa4020b569c451f2405e642008485febe9b5e7..c3d6dcbccd7c4d241ffedc9afd15383b533d767d 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -705,11 +705,11 @@ class StandardTestSuite extends TestSuite {
args.add('--out=$tempDir/out.js');
List<Command> commands =
- <Command>[new Dart2JsCommand("$tempDir/out.js",
- !useDart2JsFromSdk,
- dart2JsBootstrapDependencies,
- compilerPath,
- args)];
+ <Command>[new CompilationCommand("$tempDir/out.js",
+ !useDart2JsFromSdk,
+ dart2JsBootstrapDependencies,
+ compilerPath,
+ args)];
if (info.hasCompileError) {
// Do not attempt to run the compiled result. A compilation
// error should be reported by the compilation command.
@@ -721,12 +721,17 @@ class StandardTestSuite extends TestSuite {
return commands;
case 'dart2dart':
- var compilerArguments = new List.from(args);
- compilerArguments.add('--output-type=dart');
+ args = new List.from(args);
+ args.add('--output-type=dart');
String tempDir = createOutputDirectory(info.filePath, '');
- compilerArguments.add('--out=$tempDir/out.dart');
+ args.add('--out=$tempDir/out.dart');
+
List<Command> commands =
- <Command>[new Command(compilerPath, compilerArguments)];
+ <Command>[new CompilationCommand("$tempDir/out.dart",
+ !useDart2JsFromSdk,
+ dart2JsBootstrapDependencies,
+ compilerPath,
+ args)];
if (info.hasCompileError) {
// Do not attempt to run the compiled result. A compilation
// error should be reported by the compilation command.
@@ -1018,12 +1023,12 @@ class StandardTestSuite extends TestSuite {
args.insertRange(0, 1, executable);
executable = dartShellFileName;
}
- if (configuration['compiler'] == 'dart2js') {
- return new Dart2JsCommand(outputFile,
- !useDart2JsFromSdk,
- dart2JsBootstrapDependencies,
- compilerPath,
- args);
+ if (['dart2js', 'dart2dart'].contains(configuration['compiler'])) {
+ return new CompilationCommand(outputFile,
+ !useDart2JsFromSdk,
+ dart2JsBootstrapDependencies,
+ compilerPath,
+ args);
}
return new Command(executable, args);
}
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698