Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 #library("test_runner"); | 5 #library("test_runner"); |
| 6 | 6 |
| 7 #import("status_file_parser.dart"); | 7 #import("status_file_parser.dart"); |
| 8 #import("test_progress.dart"); | 8 #import("test_progress.dart"); |
| 9 #import("test_suite.dart"); | 9 #import("test_suite.dart"); |
| 10 | 10 |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 472 } else if (!_temporaryDirectory.startsWith('/tmp/') || | 472 } else if (!_temporaryDirectory.startsWith('/tmp/') || |
| 473 _temporaryDirectory.contains('/../')) { | 473 _temporaryDirectory.contains('/../')) { |
| 474 // Let's be extra careful, since rm -rf is so dangerous. | 474 // Let's be extra careful, since rm -rf is so dangerous. |
| 475 print('Temporary directory $_temporaryDirectory unsafe to delete!'); | 475 print('Temporary directory $_temporaryDirectory unsafe to delete!'); |
| 476 _progress.allDone(); | 476 _progress.allDone(); |
| 477 } else { | 477 } else { |
| 478 // TODO(dart:1211): Use delete(recursive=true) in Dart when it is | 478 // TODO(dart:1211): Use delete(recursive=true) in Dart when it is |
| 479 // implemented, and add Windows support. | 479 // implemented, and add Windows support. |
| 480 var deletion = | 480 var deletion = |
| 481 new Process.start('/bin/rm', ['-rf', _temporaryDirectory]); | 481 new Process.start('/bin/rm', ['-rf', _temporaryDirectory]); |
| 482 deletion.startHandler = (){ | 482 deletion.exitHandler = (int exitCode){ |
|
ricow1
2012/01/19 10:20:34
add space before {
| |
| 483 if (exitCode == 0) { | |
| 484 print('\nTemporary directory $_temporaryDirectory deleted.'); | |
| 485 } else { | |
| 486 print('\nDeletion of temp dir $_temporaryDirectory failed.'); | |
| 487 } | |
| 483 _progress.allDone(); | 488 _progress.allDone(); |
| 484 }; | 489 }; |
| 485 } | 490 } |
| 486 } | 491 } |
| 487 } | 492 } |
| 488 } | 493 } |
| 489 | 494 |
| 490 void _runTest(TestCase test) { | 495 void _runTest(TestCase test) { |
| 491 _progress.testAdded(); | 496 _progress.testAdded(); |
| 492 _tests.add(test); | 497 _tests.add(test); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 535 test.displayName != 'dartc/junit_tests') { | 540 test.displayName != 'dartc/junit_tests') { |
| 536 _ensureDartcBatchRunnersStarted(test.executablePath); | 541 _ensureDartcBatchRunnersStarted(test.executablePath); |
| 537 _getDartcBatchRunnerProcess().startTest(test); | 542 _getDartcBatchRunnerProcess().startTest(test); |
| 538 } else { | 543 } else { |
| 539 new RunningProcess(test).start(); | 544 new RunningProcess(test).start(); |
| 540 } | 545 } |
| 541 _numProcesses++; | 546 _numProcesses++; |
| 542 } | 547 } |
| 543 } | 548 } |
| 544 } | 549 } |
| OLD | NEW |