Chromium Code Reviews| 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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 395 | 395 |
| 396 Future<Map> discoverPackagesInRepository() { | 396 Future<Map> discoverPackagesInRepository() { |
| 397 /* | 397 /* |
| 398 * Layout of packages inside the dart repository: | 398 * Layout of packages inside the dart repository: |
| 399 * dart/ | 399 * dart/ |
| 400 * pkg/PACKAGE_NAME | 400 * pkg/PACKAGE_NAME |
| 401 * pkg/third_party/PACKAGE_NAME | 401 * pkg/third_party/PACKAGE_NAME |
| 402 * third_party/pkg/PACKAGE_NAME | 402 * third_party/pkg/PACKAGE_NAME |
| 403 */ | 403 */ |
| 404 | 404 |
| 405 isValid(packageName) => packageName != 'third_party'; | 405 // Packages that contain "-" in their names are pinned to specific versions. |
| 406 // We can ignore those for the purposes of testing. | |
|
kustermann
2014/05/28 07:13:57
This comment is misleading (as I already mentioned
nweiz
2014/05/28 20:33:27
Done.
| |
| 407 isValid(packageName) => | |
| 408 packageName != 'third_party' && !packageName.contains('-'); | |
| 406 | 409 |
| 407 var dartDir = TestUtils.dartDir; | 410 var dartDir = TestUtils.dartDir; |
| 408 var futures = [ | 411 var futures = [ |
| 409 listDir(dartDir.append('pkg'), isValid), | 412 listDir(dartDir.append('pkg'), isValid), |
| 410 listDir(dartDir.append('pkg').append('third_party'), isValid), | 413 listDir(dartDir.append('pkg').append('third_party'), isValid), |
| 411 listDir(dartDir.append('third_party').append('pkg'), isValid), | 414 listDir(dartDir.append('third_party').append('pkg'), isValid), |
| 412 ]; | 415 ]; |
| 413 return Future.wait(futures).then((results) { | 416 return Future.wait(futures).then((results) { |
| 414 var packageDirectories = {}; | 417 var packageDirectories = {}; |
| 415 for (var result in results) { | 418 for (var result in results) { |
| 416 for (var packageTuple in result) { | 419 for (var packageTuple in result) { |
| 417 String packageName = packageTuple[0]; | 420 String packageName = packageTuple[0]; |
| 418 | |
| 419 // Some packages are pinned to specific versions. We can ignore those | |
| 420 // for the purposes of testing. | |
| 421 if (packageName.contains('-')) continue; | |
| 422 | |
| 423 String fullPath = packageTuple[1]; | 421 String fullPath = packageTuple[1]; |
| 424 String yamlFile = | 422 String yamlFile = |
| 425 new Path(fullPath).append('pubspec.yaml').toNativePath(); | 423 new Path(fullPath).append('pubspec.yaml').toNativePath(); |
| 426 if (new File(yamlFile).existsSync()) { | 424 if (new File(yamlFile).existsSync()) { |
| 427 packageDirectories[packageName] = fullPath; | 425 packageDirectories[packageName] = fullPath; |
| 428 } | 426 } |
| 429 } | 427 } |
| 430 } | 428 } |
| 431 return packageDirectories; | 429 return packageDirectories; |
| 432 }); | 430 }); |
| (...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2224 * $pass tests are expected to pass | 2222 * $pass tests are expected to pass |
| 2225 * $failOk tests are expected to fail that we won't fix | 2223 * $failOk tests are expected to fail that we won't fix |
| 2226 * $fail tests are expected to fail that we should fix | 2224 * $fail tests are expected to fail that we should fix |
| 2227 * $crash tests are expected to crash that we should fix | 2225 * $crash tests are expected to crash that we should fix |
| 2228 * $timeout tests are allowed to timeout | 2226 * $timeout tests are allowed to timeout |
| 2229 * $compileErrorSkip tests are skipped on browsers due to compile-time error | 2227 * $compileErrorSkip tests are skipped on browsers due to compile-time error |
| 2230 """; | 2228 """; |
| 2231 print(report); | 2229 print(report); |
| 2232 } | 2230 } |
| 2233 } | 2231 } |
| OLD | NEW |