Index: utils/testrunner/delete_task.dart |
=================================================================== |
--- utils/testrunner/delete_task.dart (revision 0) |
+++ utils/testrunner/delete_task.dart (revision 0) |
@@ -0,0 +1,21 @@ |
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+// A simeple pipeline task to delete a file. |
+class DeleteTask extends PipelineTask { |
+ String filenameTemplate; |
+ |
+ DeleteTask(this.filenameTemplate); |
+ |
+ void execute(Path testfile, List stdout, List stderr, bool verboseLogging, |
+ Function exitHandler) { |
+ var fname = concretize(filenameTemplate, testfile); |
Siggi Cherem (dart-lang)
2012/08/29 01:05:55
it seems that in some of the tasks the macros are
gram
2012/08/29 20:12:26
No, the macro is important. The concrete testfile
|
+ var f = new File(fname); |
+ f.deleteSync(); |
Siggi Cherem (dart-lang)
2012/08/29 01:05:55
given that this is already an async task, you coul
gram
2012/08/29 20:12:26
Yes, but my expectation is that the underlying OS
|
+ if (verboseLogging) { |
+ stdout.add('Removing $fname'); |
+ } |
+ exitHandler(0); |
+ } |
+} |