diff options
author | 2018-04-03 14:58:26 -0700 | |
---|---|---|
committer | 2018-04-03 15:00:14 -0700 | |
commit | e3824d43223e63c147c39416b011bc84ed6bbdee (patch) | |
tree | ad80579ee295524be9fa46f50771fa887e122861 /src/test/java/com/google | |
parent | 8d7b1cbbd1f7f13898b2a0edc532ca5bfa6f9ad8 (diff) |
BazelPackageLoader to be invoked on additional tests.
I originally blacklisted BazelPackageLoader on some tests because they became flaky with it.
RELNOTES: None
PiperOrigin-RevId: 191504852
Diffstat (limited to 'src/test/java/com/google')
3 files changed, 4 insertions, 24 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java index 61d238f8d2..1bb4efda38 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java @@ -73,17 +73,6 @@ import org.junit.runners.JUnit4; public class AndroidBinaryTest extends AndroidBuildViewTestCase { @Before - public final void turnOffPackageLoadingChecks() throws Exception { - // By default, PackageLoader loads every package the test harness loads, in order to verify - // the PackageLoader works correctly. In this test, however, PackageLoader sometimes fails to - // load packages and causes the test to become flaky. - // Since PackageLoader gets generally good coverage from the rest of Bazel's tests, and because - // we believe there's nothing special from the point of view of package loading in this test, - // we disable this verification here. - initializeSkyframeExecutor(/*doPackageLoadingChecks=*/ false); - } - - @Before public void createFiles() throws Exception { scratch.file("java/android/BUILD", "android_binary(name = 'app',", diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/AppleBinaryTest.java b/src/test/java/com/google/devtools/build/lib/rules/objc/AppleBinaryTest.java index 46168736d2..3c8a064e5f 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/objc/AppleBinaryTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/objc/AppleBinaryTest.java @@ -44,7 +44,6 @@ import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set; -import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -52,17 +51,6 @@ import org.junit.runners.JUnit4; /** Test case for apple_binary. */ @RunWith(JUnit4.class) public class AppleBinaryTest extends ObjcRuleTestCase { - @Before - public final void turnOffPackageLoadingChecks() throws Exception { - // By default, PackageLoader loads every package the test harness loads, in order to verify - // the PackageLoader works correctly. In this test, however, PackageLoader sometimes fails to - // load packages and causes the test to become flaky. - // Since PackageLoader gets generally good coverage from the rest of Bazel's tests, and because - // we believe there's nothing special from the point of view of package loading in this test, - // we disable this verification here. - initializeSkyframeExecutor(/*doPackageLoadingChecks=*/ false); - } - static final RuleType RULE_TYPE = new RuleType("apple_binary") { @Override Iterable<String> requiredAttributes(Scratch scratch, String packageDir, diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/RecursivePkgFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/RecursivePkgFunctionTest.java index 679d276e48..be2e33b46d 100644 --- a/src/test/java/com/google/devtools/build/lib/skyframe/RecursivePkgFunctionTest.java +++ b/src/test/java/com/google/devtools/build/lib/skyframe/RecursivePkgFunctionTest.java @@ -51,7 +51,6 @@ public class RecursivePkgFunctionTest extends BuildViewTestCase { @Before public final void createSkyframeExecutor() throws Exception { - initializeSkyframeExecutor(/*doPackageLoadingChecks=*/ false); skyframeExecutor = getSkyframeExecutor(); } @@ -97,6 +96,10 @@ public class RecursivePkgFunctionTest extends BuildViewTestCase { @Test public void testPackagesUnderMultipleRoots() throws Exception { + // PackageLoader doesn't support --package_path. + initializeSkyframeExecutor(/*doPackageLoadingChecks=*/ false); + skyframeExecutor = getSkyframeExecutor(); + Path root1 = rootDirectory.getRelative("root1"); Path root2 = rootDirectory.getRelative("root2"); scratch.file(root1 + "/WORKSPACE"); |