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

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

Issue 11280061: Revert "Added support for skipping redundant dart2js compilations." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 0293725de2854df0295d51d00fa1b4f6497d9733..3705e577991ca853808f3faee5b4b6ad1d58cfc2 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -20,7 +20,6 @@
#import("test_runner.dart");
#import("multitest.dart");
#import("drt_updater.dart");
-#import("dart:uri");
#source("browser_test.dart");
@@ -440,19 +439,6 @@ class StandardTestSuite extends TestSuite {
recursive: true);
}
- Collection<Uri> get dart2JsBootstrapDependencies {
- if (!useDart2JsFromSdk) return [];
-
- var snapshotPath = TestUtils.absolutePath(new Path(buildDir).join(
- new Path('dart-sdk/lib/_internal/compiler/'
- 'implementation/dart2js.dart.snapshot'))).toString();
- return [new Uri.fromComponents(scheme: 'file', path: snapshotPath)];
- }
-
- bool get useDart2JsFromSdk {
- return configuration['use_sdk'];
- }
-
/**
* The default implementation assumes a file is a test if
* it ends in "Test.dart".
@@ -708,12 +694,7 @@ class StandardTestSuite extends TestSuite {
args = new List.from(args);
String tempDir = createOutputDirectory(info.filePath, '');
args.add('--out=$tempDir/out.js');
- List<Command> commands =
- <Command>[new Dart2JsCommand("$tempDir/out.js",
- !useDart2JsFromSdk,
- dart2JsBootstrapDependencies,
- dartShellFileName,
- args)];
+ List<Command> commands = <Command>[new Command(dartShellFileName, args)];
if (info.hasCompileError) {
// Do not attempt to run the compiled result. A compilation
// error should be reported by the compilation command.
@@ -1026,13 +1007,6 @@ class StandardTestSuite extends TestSuite {
args.insertRange(0, 1, executable);
executable = dartShellFileName;
}
- if (configuration['compiler'] == 'dart2js') {
- return new Dart2JsCommand(outputFile,
- !useDart2JsFromSdk,
- dart2JsBootstrapDependencies,
- dartShellFileName,
- args);
- }
return new Command(executable, args);
}
@@ -1520,31 +1494,6 @@ class JUnitTestSuite extends TestSuite {
}
}
-class LastModifiedCache {
- Map<String, Date> _cache = <String, Date>{};
-
- /**
- * Returns the last modified date of the given [uri].
- *
- * The return value will be cached for future queries. If [uri] is a local
- * file, it's last modified [Date] will be returned. If the file does not
- * exist, null will be returned instead.
- * In case [uri] is not a local file, this method will always return
- * the current date.
- */
- Date getLastModified(Uri uri) {
- if (uri.scheme == "file") {
- if (_cache.containsKey(uri.path)) {
- return _cache[uri.path];
- }
- var file = new File(new Path(uri.path).toNativePath());
- _cache[uri.path] = file.existsSync() ? file.lastModifiedSync() : null;
- return _cache[uri.path];
- }
- return new Date.now();
- }
-}
-
class TestUtils {
/**
* The libraries in this directory relies on finding various files
@@ -1553,8 +1502,7 @@ class TestUtils {
* script must set this to '.../dart/tools/test.dart'.
*/
static String testScriptPath = new Options().script;
- static LastModifiedCache lastModifiedCache = new LastModifiedCache();
- static Path currentWorkingDirectory = new Path.fromNative(new Directory.current().path);
+
/**
* Creates a directory using a [relativePath] to an existing
* [base] directory if that [relativePath] does not already exist.
@@ -1602,13 +1550,6 @@ class TestUtils {
}
}
- static Path absolutePath(Path path) {
- if (!path.isAbsolute) {
- return currentWorkingDirectory.join(path);
- }
- return path;
- }
-
static String outputDir(Map configuration) {
var result = '';
var system = configuration['system'];
« 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