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,26 @@ |
| }); |
| } |
| + 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. |
| + if (Platform.operatingSystem == 'windows') { |
|
Bill Hesse
2014/08/11 09:24:13
Can we include a bug number or TODO about making d
ricow1
2014/08/11 09:37:30
Done
|
| + 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. ' |
|
Bill Hesse
2014/08/11 09:24:13
Maybe you should check the length of the path befo
ricow1
2014/08/11 09:37:30
That will actually throw an ProcessException, we w
|
| + 'This may be becaust the path is to long'); |
| + } |
| + }); |
| + } else { |
| + var dir = new io.Directory(path); |
| + return dir.delete(recursive: true); |
| + } |
| + } |
| + |
| static Path debugLogfile() { |
| return new Path(".debug.log"); |
| } |