| 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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 260 |
| 261 Future deleteTemporaryDartDirectories() { | 261 Future deleteTemporaryDartDirectories() { |
| 262 var completer = new Completer(); | 262 var completer = new Completer(); |
| 263 var environment = Platform.environment; | 263 var environment = Platform.environment; |
| 264 if (environment['DART_TESTING_DELETE_TEMPORARY_DIRECTORIES'] == '1') { | 264 if (environment['DART_TESTING_DELETE_TEMPORARY_DIRECTORIES'] == '1') { |
| 265 Directory getTempDir() { | 265 Directory getTempDir() { |
| 266 // dir will be located in the system temporary directory. | 266 // dir will be located in the system temporary directory. |
| 267 var dir = new Directory('').createTempSync(); | 267 var dir = new Directory('').createTempSync(); |
| 268 var path = new Path(dir.path).directoryPath; | 268 var path = new Path(dir.path).directoryPath; |
| 269 dir.deleteSync(); | 269 dir.deleteSync(); |
| 270 return new Directory.fromPath(path); | 270 return new Directory(path.toNativePath()); |
| 271 } | 271 } |
| 272 | 272 |
| 273 // These are the patterns of temporary directory names created by | 273 // These are the patterns of temporary directory names created by |
| 274 // 'Directory.createTempSync()' on linux/macos and windows. | 274 // 'Directory.createTempSync()' on linux/macos and windows. |
| 275 var regExp; | 275 var regExp; |
| 276 if (['macos', 'linux'].contains(Platform.operatingSystem)) { | 276 if (['macos', 'linux'].contains(Platform.operatingSystem)) { |
| 277 regExp = new RegExp(r'^temp_dir1_......$'); | 277 regExp = new RegExp(r'^temp_dir1_......$'); |
| 278 } else { | 278 } else { |
| 279 regExp = new RegExp(r'tempdir-........-....-....-....-............$'); | 279 regExp = new RegExp(r'tempdir-........-....-....-....-............$'); |
| 280 } | 280 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 299 void main() { | 299 void main() { |
| 300 deleteTemporaryDartDirectories().then((_) { | 300 deleteTemporaryDartDirectories().then((_) { |
| 301 var optionsParser = new TestOptionsParser(); | 301 var optionsParser = new TestOptionsParser(); |
| 302 var configurations = optionsParser.parse(new Options().arguments); | 302 var configurations = optionsParser.parse(new Options().arguments); |
| 303 if (configurations != null && configurations.length > 0) { | 303 if (configurations != null && configurations.length > 0) { |
| 304 testConfigurations(configurations); | 304 testConfigurations(configurations); |
| 305 } | 305 } |
| 306 }); | 306 }); |
| 307 } | 307 } |
| 308 | 308 |
| OLD | NEW |