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

Side by Side Diff: tools/testing/dart/test_runner.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/testing/dart/test_suite.dart » ('j') | tools/testing/dart/test_suite.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Classes and methods for executing tests. 6 * Classes and methods for executing tests.
7 * 7 *
8 * This module includes: 8 * This module includes:
9 * - Managing parallel execution of tests, including timeout checks. 9 * - Managing parallel execution of tests, including timeout checks.
10 * - Evaluating the output of each test as pass/fail/crash/timeout. 10 * - Evaluating the output of each test as pass/fail/crash/timeout.
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 411
412 Future<ScriptCommandOutputImpl> run() { 412 Future<ScriptCommandOutputImpl> run() {
413 var watch = new Stopwatch()..start(); 413 var watch = new Stopwatch()..start();
414 414
415 var source = new io.Directory(_sourceDirectory); 415 var source = new io.Directory(_sourceDirectory);
416 var destination = new io.Directory(_destinationDirectory); 416 var destination = new io.Directory(_destinationDirectory);
417 417
418 return destination.exists().then((bool exists) { 418 return destination.exists().then((bool exists) {
419 var cleanDirectoryFuture; 419 var cleanDirectoryFuture;
420 if (exists) { 420 if (exists) {
421 cleanDirectoryFuture = destination.delete(recursive: true); 421 cleanDirectoryFuture = TestUtils.deleteDirectory(_destinationDirectory);
422 } else { 422 } else {
423 cleanDirectoryFuture = new Future.value(null); 423 cleanDirectoryFuture = new Future.value(null);
424 } 424 }
425 return cleanDirectoryFuture.then((_) { 425 return cleanDirectoryFuture.then((_) {
426 return TestUtils.copyDirectory(_sourceDirectory, _destinationDirectory); 426 return TestUtils.copyDirectory(_sourceDirectory, _destinationDirectory);
427 }); 427 });
428 }).then((_) { 428 }).then((_) {
429 return new ScriptCommandOutputImpl( 429 return new ScriptCommandOutputImpl(
430 this, Expectation.PASS, "", watch.elapsed); 430 this, Expectation.PASS, "", watch.elapsed);
431 }).catchError((error) { 431 }).catchError((error) {
(...skipping 2525 matching lines...) Expand 10 before | Expand all | Expand 10 after
2957 } 2957 }
2958 } 2958 }
2959 2959
2960 void eventAllTestsDone() { 2960 void eventAllTestsDone() {
2961 for (var listener in _eventListener) { 2961 for (var listener in _eventListener) {
2962 listener.allDone(); 2962 listener.allDone();
2963 } 2963 }
2964 _allDone(); 2964 _allDone();
2965 } 2965 }
2966 } 2966 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/test_suite.dart » ('j') | tools/testing/dart/test_suite.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698