Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: tools/testing/dart/test_suite.dart

Issue 2019163002: Make test.dart override only those dependencies declared in the pubspec.yaml (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 .toList(); 430 .toList();
431 }); 431 });
432 } 432 }
433 433
434 Future<Map> discoverPackagesInRepository() { 434 Future<Map> discoverPackagesInRepository() {
435 /* 435 /*
436 * Layout of packages inside the dart repository: 436 * Layout of packages inside the dart repository:
437 * dart/ 437 * dart/
438 * pkg/PACKAGE_NAME 438 * pkg/PACKAGE_NAME
439 * third_party/pkg/PACKAGE_NAME 439 * third_party/pkg/PACKAGE_NAME
440 * third_party/pkg_tested/PACKAGE_NAME
440 * runtime/observatory/PACKAGE_NAME 441 * runtime/observatory/PACKAGE_NAME
441 * sdk/lib/_internal/PACKAGE_NAME 442 * sdk/lib/_internal/PACKAGE_NAME
442 */ 443 */
443 444
444 // Directories containing "-" are not valid pub packages and we therefore 445 // Directories containing "-" are not valid pub packages and we therefore
445 // do not include them in the list of packages. 446 // do not include them in the list of packages.
446 isValid(packageName) => 447 isValid(packageName) =>
447 packageName != 'third_party' && !packageName.contains('-'); 448 packageName != 'third_party' && !packageName.contains('-');
448 449
449 var dartDir = TestUtils.dartDir; 450 var dartDir = TestUtils.dartDir;
450 var futures = [ 451 var futures = [
451 listDir(dartDir.append('pkg'), isValid), 452 listDir(dartDir.append('pkg'), isValid),
452 listDir(dartDir.append('third_party').append('pkg'), isValid), 453 listDir(dartDir.append('third_party').append('pkg'), isValid),
454 listDir(dartDir.append('third_party').append('pkg_tested'), isValid),
453 listDir(dartDir.append('runtime').append('observatory'), isValid), 455 listDir(dartDir.append('runtime').append('observatory'), isValid),
454 listDir(dartDir.append('sdk').append('lib').append('_internal'), isValid), 456 listDir(dartDir.append('sdk').append('lib').append('_internal'), isValid),
455 ]; 457 ];
456 return Future.wait(futures).then((results) { 458 return Future.wait(futures).then((results) {
457 var packageDirectories = {}; 459 var packageDirectories = {};
458 for (var result in results) { 460 for (var result in results) {
459 for (var packageTuple in result) { 461 for (var packageTuple in result) {
460 String packageName = packageTuple[0]; 462 String packageName = packageTuple[0];
461 String fullPath = packageTuple[1]; 463 String fullPath = packageTuple[1];
462 String yamlFile = 464 String yamlFile =
(...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after
2454 for (var key in PATH_REPLACEMENTS.keys) { 2456 for (var key in PATH_REPLACEMENTS.keys) {
2455 if (path.startsWith(key)) { 2457 if (path.startsWith(key)) {
2456 path = path.replaceFirst(key, PATH_REPLACEMENTS[key]); 2458 path = path.replaceFirst(key, PATH_REPLACEMENTS[key]);
2457 break; 2459 break;
2458 } 2460 }
2459 } 2461 }
2460 } 2462 }
2461 return path; 2463 return path;
2462 } 2464 }
2463 } 2465 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698