| OLD | NEW |
| 1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
| 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
| 4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 /** | 6 /** |
| 7 * This file is the entrypoint of the dart test suite. This suite is used | 7 * This file is the entrypoint of the dart test suite. This suite is used |
| 8 * to test: | 8 * to test: |
| 9 * | 9 * |
| 10 * 1. the dart vm | 10 * 1. the dart vm |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * "tools/testing/dart/test_suite.dart", above | 25 * "tools/testing/dart/test_suite.dart", above |
| 26 * "factory StandardTestSuite.forDirectory". | 26 * "factory StandardTestSuite.forDirectory". |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 library test; | 29 library test; |
| 30 | 30 |
| 31 import "dart:async"; | 31 import "dart:async"; |
| 32 import "dart:io"; | 32 import "dart:io"; |
| 33 import "testing/dart/test_configurations.dart"; | 33 import "testing/dart/test_configurations.dart"; |
| 34 import "testing/dart/test_options.dart"; | 34 import "testing/dart/test_options.dart"; |
| 35 import "testing/dart/test_progress.dart"; | 35 import "testing/dart/lib/test_progress.dart"; |
| 36 import "testing/dart/test_suite.dart"; | 36 import 'testing/dart/lib/test_utils.dart'; |
| 37 import "testing/dart/utils.dart"; | 37 import "testing/dart/lib/utils.dart"; |
| 38 | 38 |
| 39 Future _deleteTemporaryDartDirectories() { | 39 Future _deleteTemporaryDartDirectories() { |
| 40 var completer = new Completer(); | 40 var completer = new Completer(); |
| 41 var environment = Platform.environment; | 41 var environment = Platform.environment; |
| 42 if (environment['DART_TESTING_DELETE_TEMPORARY_DIRECTORIES'] == '1') { | 42 if (environment['DART_TESTING_DELETE_TEMPORARY_DIRECTORIES'] == '1') { |
| 43 LeftOverTempDirPrinter.getLeftOverTemporaryDirectories().listen( | 43 LeftOverTempDirPrinter.getLeftOverTemporaryDirectories().listen( |
| 44 (Directory tempDirectory) { | 44 (Directory tempDirectory) { |
| 45 try { | 45 try { |
| 46 tempDirectory.deleteSync(recursive: true); | 46 tempDirectory.deleteSync(recursive: true); |
| 47 } catch (error) { | 47 } catch (error) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 58 // This script is in [dart]/tools. | 58 // This script is in [dart]/tools. |
| 59 TestUtils.setDartDirUri(Platform.script.resolve('..')); | 59 TestUtils.setDartDirUri(Platform.script.resolve('..')); |
| 60 _deleteTemporaryDartDirectories().then((_) { | 60 _deleteTemporaryDartDirectories().then((_) { |
| 61 var optionsParser = new TestOptionsParser(); | 61 var optionsParser = new TestOptionsParser(); |
| 62 var configurations = optionsParser.parse(arguments); | 62 var configurations = optionsParser.parse(arguments); |
| 63 if (configurations != null && configurations.length > 0) { | 63 if (configurations != null && configurations.length > 0) { |
| 64 testConfigurations(configurations); | 64 testConfigurations(configurations); |
| 65 } | 65 } |
| 66 }); | 66 }); |
| 67 } | 67 } |
| OLD | NEW |