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

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

Issue 9704083: Use dart:io directory deletion instead of starting a process. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_runner.dart
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index 4fed4202d98457a0ff1c2869dbb18953c597bc4b..34d193dda321534ecf0e4ff69eb8f2070262606e 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -909,19 +909,12 @@ class ProcessQueue {
print('Temporary directory $_temporaryDirectory unsafe to delete!');
_cleanupAndMarkDone();
} else {
- // TODO(dart:1211): Use delete(recursive=true) in Dart when it is
- // implemented, and add Windows support.
- var deletion =
- new Process.start('/bin/rm', ['-rf', _temporaryDirectory]);
- deletion.onExit = (int exitCode) {
- if (exitCode == 0) {
- if (!_listTests) { // Output of --list option is used by scripts.
- print('\nTemporary directory $_temporaryDirectory deleted.');
- }
- } else {
- print('\nDeletion of temp dir $_temporaryDirectory failed.');
- }
+ Directory dir = new Directory(_temporaryDirectory);
+ dir.deleteRecursively(() {
_cleanupAndMarkDone();
+ });
+ dir.onError = (err) {
+ print('\nDeletion of temp dir $_temporaryDirectory failed: $err');
};
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698