From e0d1d0ef7e1d53f232a457ac66496a5d8d9b82e3 Mon Sep 17 00:00:00 2001 From: John Cater Date: Tue, 28 Nov 2017 20:47:41 -0800 Subject: Update PathPackageLocator to take a list of potential build file names, instead of assuming BUILD. - Default the list to the same value as PackageLookupFunction: BUILD.bazel, BUILD. - Move BuildFileNames to the packages package, so it is more generally available. Part of #4056. Change-Id: Ie12512b492cd7d47a9e56ec3bc209f829feaf4b5 PiperOrigin-RevId: 177261295 --- .../build/lib/skyframe/ContainingPackageLookupFunctionTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/test/java/com/google/devtools/build/lib/skyframe/ContainingPackageLookupFunctionTest.java') diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/ContainingPackageLookupFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/ContainingPackageLookupFunctionTest.java index 19b0c95224..b2a28a0a2f 100644 --- a/src/test/java/com/google/devtools/build/lib/skyframe/ContainingPackageLookupFunctionTest.java +++ b/src/test/java/com/google/devtools/build/lib/skyframe/ContainingPackageLookupFunctionTest.java @@ -36,7 +36,6 @@ import com.google.devtools.build.lib.rules.repository.RepositoryFunction; import com.google.devtools.build.lib.rules.repository.RepositoryLoaderFunction; import com.google.devtools.build.lib.skyframe.ExternalFilesHelper.ExternalFileAction; import com.google.devtools.build.lib.skyframe.PackageLookupFunction.CrossRepositoryLabelViolationStrategy; -import com.google.devtools.build.lib.skyframe.PackageLookupValue.BuildFileName; import com.google.devtools.build.lib.syntax.SkylarkSemantics; import com.google.devtools.build.lib.testutil.FoundationTestCase; import com.google.devtools.build.lib.util.io.TimestampGranularityMonitor; @@ -75,7 +74,11 @@ public class ContainingPackageLookupFunctionTest extends FoundationTestCase { AnalysisMock analysisMock = AnalysisMock.get(); AtomicReference pkgLocator = - new AtomicReference<>(new PathPackageLocator(outputBase, ImmutableList.of(rootDirectory))); + new AtomicReference<>( + new PathPackageLocator( + outputBase, + ImmutableList.of(rootDirectory), + BazelSkyframeExecutorConstants.BUILD_FILES_BY_PRIORITY)); deletedPackages = new AtomicReference<>(ImmutableSet.of()); BlazeDirectories directories = new BlazeDirectories( @@ -96,7 +99,7 @@ public class ContainingPackageLookupFunctionTest extends FoundationTestCase { new PackageLookupFunction( deletedPackages, CrossRepositoryLabelViolationStrategy.ERROR, - ImmutableList.of(BuildFileName.BUILD_DOT_BAZEL, BuildFileName.BUILD))); + BazelSkyframeExecutorConstants.BUILD_FILES_BY_PRIORITY)); skyFunctions.put( SkyFunctions.PACKAGE, new PackageFunction(null, null, null, null, null, null, null)); skyFunctions.put(SkyFunctions.BLACKLISTED_PACKAGE_PREFIXES, -- cgit v1.2.3