| OLD | NEW |
| 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 enumerating and preparing tests. | 6 * Classes and methods for enumerating and preparing tests. |
| 7 * | 7 * |
| 8 * This library includes: | 8 * This library includes: |
| 9 * | 9 * |
| 10 * - Creating tests by listing all the Dart files in certain directories, | 10 * - Creating tests by listing all the Dart files in certain directories, |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 */ | 416 */ |
| 417 | 417 |
| 418 // Directories containing "-" are not valid pub packages and we therefore | 418 // Directories containing "-" are not valid pub packages and we therefore |
| 419 // do not include them in the list of packages. | 419 // do not include them in the list of packages. |
| 420 isValid(packageName) => | 420 isValid(packageName) => |
| 421 packageName != 'third_party' && !packageName.contains('-'); | 421 packageName != 'third_party' && !packageName.contains('-'); |
| 422 | 422 |
| 423 var dartDir = TestUtils.dartDir; | 423 var dartDir = TestUtils.dartDir; |
| 424 var futures = [ | 424 var futures = [ |
| 425 listDir(dartDir.append('pkg'), isValid), | 425 listDir(dartDir.append('pkg'), isValid), |
| 426 listDir(dartDir.append('pkg').append('third_party'), isValid), | |
| 427 listDir(dartDir.append('third_party').append('pkg'), isValid), | 426 listDir(dartDir.append('third_party').append('pkg'), isValid), |
| 428 listDir(dartDir.append('runtime').append('observatory'), isValid), | 427 listDir(dartDir.append('runtime').append('observatory'), isValid), |
| 429 ]; | 428 ]; |
| 430 return Future.wait(futures).then((results) { | 429 return Future.wait(futures).then((results) { |
| 431 var packageDirectories = {}; | 430 var packageDirectories = {}; |
| 432 for (var result in results) { | 431 for (var result in results) { |
| 433 for (var packageTuple in result) { | 432 for (var packageTuple in result) { |
| 434 String packageName = packageTuple[0]; | 433 String packageName = packageTuple[0]; |
| 435 String fullPath = packageTuple[1]; | 434 String fullPath = packageTuple[1]; |
| 436 String yamlFile = | 435 String yamlFile = |
| (...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2398 for (var key in PATH_REPLACEMENTS.keys) { | 2397 for (var key in PATH_REPLACEMENTS.keys) { |
| 2399 if (path.startsWith(key)) { | 2398 if (path.startsWith(key)) { |
| 2400 path = path.replaceFirst(key, PATH_REPLACEMENTS[key]); | 2399 path = path.replaceFirst(key, PATH_REPLACEMENTS[key]); |
| 2401 break; | 2400 break; |
| 2402 } | 2401 } |
| 2403 } | 2402 } |
| 2404 } | 2403 } |
| 2405 return path; | 2404 return path; |
| 2406 } | 2405 } |
| 2407 } | 2406 } |
| OLD | NEW |