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

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

Issue 17601013: Revert "Do not compile tests for different browsers separately" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | « tests/standalone/io/skipping_dart2js_compilations_test.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_runner.dart
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index bc6718431d970b46b3147ed618d6623148204d7d..73c9cba04c25affcc6683ff3a7c55354d7866597 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -123,8 +123,6 @@ class Command {
String toString() => commandLine;
- Future postProcessCommand() => new Future.immediate(null);
-
Future<bool> get outputIsUpToDate => new Future.immediate(false);
io.Path get expectedOutputFile => null;
bool get isPixelTest => false;
@@ -132,12 +130,10 @@ class Command {
class CompilationCommand extends Command {
String _outputFile;
- String _shadowFile;
bool _neverSkipCompilation;
List<Uri> _bootstrapDependencies;
CompilationCommand(this._outputFile,
- this._shadowFile,
this._neverSkipCompilation,
this._bootstrapDependencies,
String executable,
@@ -164,11 +160,11 @@ class CompilationCommand extends Command {
});
}
- return readDepsFile("${_shadowFile}.deps").then((dependencies) {
+ return readDepsFile("$_outputFile.deps").then((dependencies) {
if (dependencies != null) {
dependencies.addAll(_bootstrapDependencies);
var jsOutputLastModified = TestUtils.lastModifiedCache.getLastModified(
- new Uri.fromComponents(scheme: 'file', path: _shadowFile));
+ new Uri.fromComponents(scheme: 'file', path: _outputFile));
if (jsOutputLastModified != null) {
for (var dependency in dependencies) {
var dependencyLastModified =
@@ -178,35 +174,12 @@ class CompilationCommand extends Command {
return false;
}
}
- // Shadow files are up to date, so copy them.
- _copyFilesSync(_shadowFile, _outputFile);
return true;
}
}
return false;
});
}
-
- Future postProcessCommand() {
- // After the actual compile, we synchronously copy the compiled output files
- // to shadow files.
- _copyFilesSync(_outputFile, _shadowFile);
- return new Future.immediate(null);
- }
-
- _copyFilesSync(String from, String to) {
- for (var ending in ['', '.deps', '.map']) {
- var fromFile = new io.File("${from}${ending}");
- var toFile = new io.File("${to}${ending}");
- if (fromFile.existsSync()) {
- // We copy the dart2js results synchronously to make it atomic.
- // This ensures that the shadow files are always in a consistent state
- // (no other code in the testing scripts will see a half-written shadow
- // file).
- toFile.writeAsBytesSync(fromFile.readAsBytesSync());
- }
- }
- }
}
class ContentShellCommand extends Command {
@@ -1071,15 +1044,7 @@ class RunningProcess {
process.kill();
}
}
- process.exitCode.then((exitCode) {
- if (exitCode == 0) {
- command.postProcessCommand().then((_) {
- _commandComplete(exitCode);
- });
- } else {
- _commandComplete(exitCode);
- }
- });
+ process.exitCode.then(_commandComplete);
_drainStream(process.stdout, stdout);
_drainStream(process.stderr, stderr);
timeoutTimer = new Timer(new Duration(seconds: testCase.timeout),
« no previous file with comments | « tests/standalone/io/skipping_dart2js_compilations_test.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698