Chromium Code Reviews| 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 may be because the path is to long'); |
|
Bill Hesse
2014/08/11 10:22:17
If you are going to say this, it should say "This
ricow1
2014/08/11 10:41:26
Done.
|
| + } |
| + }); |
| + } else { |
| + var dir = new io.Directory(path); |
| + return dir.delete(recursive: true); |
| + } |
| + } |
| + |
| static Path debugLogfile() { |
| return new Path(".debug.log"); |
| } |