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

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

Issue 462523002: Use rmdir to delete pkgbuild directories on windows (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 | « 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 39069)
+++ tools/testing/dart/test_suite.dart (working copy)
@@ -1951,6 +1951,27 @@
});
}
+ static Future deleteDirectory(String path) {
+ // We are seeing issues with long path names on windows when
+ // deleting them. Use the system tools to delete our long paths.
+ // See issue 16264.
+ if (Platform.operatingSystem == 'windows') {
+ var native_path = new Path(path).toNativePath();
+ // Running this in a shell sucks, but rmdir is not part of the standard
+ // path.
+ return Process.run('rmdir', ['/s', '/q', native_path], runInShell: true)
+ .then((ProcessResult result) {
+ if (result.exitCode != 0) {
+ throw new Exception('Can\'t delete path $native_path. '
+ 'This path might be too long');
+ }
+ });
+ } else {
+ var dir = new io.Directory(path);
+ return dir.delete(recursive: true);
+ }
+ }
+
static Path debugLogfile() {
return new Path(".debug.log");
}
« 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