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

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

Issue 256743009: Cache output of dart2js compilations that went wrong on disk. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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
« tools/testing/dart/test_runner.dart ('K') | « 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
===================================================================
--- tools/testing/dart/test_suite.dart (revision 35513)
+++ tools/testing/dart/test_suite.dart (working copy)
@@ -1880,6 +1880,7 @@
static Path dartDir = new Path(new File(testScriptPath).absolute.path)
.directoryPath.directoryPath;
+
Bill Hesse 2014/04/29 17:51:55 In the class below this, we don't have a double li
ricow1 2014/04/30 06:51:01 Done.
/**
* Creates a directory using a [relativePath] to an existing
* [base] directory if that [relativePath] does not already exist.
@@ -1917,6 +1918,17 @@
.pipe(new File(dest.toNativePath()).openWrite());
}
+ static Future isContentEqual(Path source, Path dest) {
+ return new File(source.toNativePath()).readAsString()
+ .then((srcString) {
+ return new File(dest.toNativePath()).readAsString()
+ .then((destString) => srcString == destString);
+ })
+ .catchError((error) {
+ return false;
+ });
+ }
+
static Future copyDirectory(String source, String dest) {
source = new Path(source).toNativePath();
dest = new Path(dest).toNativePath();
@@ -2145,6 +2157,11 @@
}
return path;
}
+
+ static String cachedOutputFile(String outputFile) {
+ return "$outputFile.cached_output";
+ }
+
}
class SummaryReport {
« tools/testing/dart/test_runner.dart ('K') | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698