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 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 // NOTE: We make a link in the package-root to pkg/expect, since | 888 // NOTE: We make a link in the package-root to pkg/expect, since |
889 // 'package:expect' is not available on pub.dartlang.org! | 889 // 'package:expect' is not available on pub.dartlang.org! |
890 var expectLink = newPackageRoot.append('expect'); | 890 var expectLink = newPackageRoot.append('expect'); |
891 var expectLinkTarget = TestUtils.dartDir | 891 var expectLinkTarget = TestUtils.dartDir |
892 .append('pkg').append('expect').append('lib'); | 892 .append('pkg').append('expect').append('lib'); |
893 | 893 |
894 // Generate dependency overrides if we use repository packages. | 894 // Generate dependency overrides if we use repository packages. |
895 var packageDirectories = {}; | 895 var packageDirectories = {}; |
896 if (configuration['use_repository_packages']) { | 896 if (configuration['use_repository_packages']) { |
897 packageDirectories = new Map.from(localPackageDirectories); | 897 packageDirectories = new Map.from(localPackageDirectories); |
| 898 |
| 899 // Don't create a dependency override for pub, since it's an application |
| 900 // package and it has a dependency on compiler_unsupported which isn't |
| 901 // in the repo. |
| 902 packageDirectories.remove('pub'); |
| 903 |
898 // Do not create an dependency override for the package itself. | 904 // Do not create an dependency override for the package itself. |
899 if (packageDirectories.containsKey(packageName)) { | 905 if (packageDirectories.containsKey(packageName)) { |
900 packageDirectories.remove(packageName); | 906 packageDirectories.remove(packageName); |
901 } | 907 } |
902 } | 908 } |
903 var overrides = buildPubspecDependencyOverrides(packageDirectories); | 909 var overrides = buildPubspecDependencyOverrides(packageDirectories); |
904 | 910 |
905 commands.add(CommandBuilder.instance.getModifyPubspecCommand( | 911 commands.add(CommandBuilder.instance.getModifyPubspecCommand( |
906 pubspecYamlFile.toNativePath(), overrides, | 912 pubspecYamlFile.toNativePath(), overrides, |
907 destinationFile: modifiedYamlFile.toNativePath())); | 913 destinationFile: modifiedYamlFile.toNativePath())); |
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1981 // Collect necessary paths for pubspec.yaml overrides, pub-cache, ... | 1987 // Collect necessary paths for pubspec.yaml overrides, pub-cache, ... |
1982 var checkoutDir = | 1988 var checkoutDir = |
1983 createPubPackageBuildsDirectory(absoluteDirectoryPath); | 1989 createPubPackageBuildsDirectory(absoluteDirectoryPath); |
1984 var cacheDir = new Path(checkoutDir).append("pub-cache").toNativePath(); | 1990 var cacheDir = new Path(checkoutDir).append("pub-cache").toNativePath(); |
1985 var pubspecYamlFile = | 1991 var pubspecYamlFile = |
1986 new Path(checkoutDir).append('pubspec.yaml').toNativePath(); | 1992 new Path(checkoutDir).append('pubspec.yaml').toNativePath(); |
1987 | 1993 |
1988 var packageDirectories = {}; | 1994 var packageDirectories = {}; |
1989 if (!configuration['use_public_packages']) { | 1995 if (!configuration['use_public_packages']) { |
1990 packageDirectories = new Map.from(localPackageDirectories); | 1996 packageDirectories = new Map.from(localPackageDirectories); |
| 1997 |
| 1998 // Don't create a dependency override for pub, since it's an |
| 1999 // application package and it has a dependency on compiler_unsupported |
| 2000 // which isn't in the repo. |
| 2001 packageDirectories.remove('pub'); |
| 2002 |
1991 if (packageDirectories.containsKey(packageName)) { | 2003 if (packageDirectories.containsKey(packageName)) { |
1992 packageDirectories.remove(packageName); | 2004 packageDirectories.remove(packageName); |
1993 } | 2005 } |
1994 } | 2006 } |
1995 var dependencyOverrides = | 2007 var dependencyOverrides = |
1996 buildPubspecDependencyOverrides(packageDirectories); | 2008 buildPubspecDependencyOverrides(packageDirectories); |
1997 | 2009 |
1998 // Build all commands | 2010 // Build all commands |
1999 var commands = new List<Command>(); | 2011 var commands = new List<Command>(); |
2000 commands.add( | 2012 commands.add( |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2431 for (var key in PATH_REPLACEMENTS.keys) { | 2443 for (var key in PATH_REPLACEMENTS.keys) { |
2432 if (path.startsWith(key)) { | 2444 if (path.startsWith(key)) { |
2433 path = path.replaceFirst(key, PATH_REPLACEMENTS[key]); | 2445 path = path.replaceFirst(key, PATH_REPLACEMENTS[key]); |
2434 break; | 2446 break; |
2435 } | 2447 } |
2436 } | 2448 } |
2437 } | 2449 } |
2438 return path; | 2450 return path; |
2439 } | 2451 } |
2440 } | 2452 } |
OLD | NEW |