summaryrefslogtreecommitdiff
path: root/java/java_test.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-03-21 11:26:05 +0000
committerPaul Duffin <paulduffin@google.com>2021-03-22 18:31:53 +0000
commit70d3bee3e03918cf1225fde603aa54385dba8085 (patch)
tree7f036236b781e679da609f9d7a486eac11ba60d9 /java/java_test.go
parent89648f98faf46f4c9ae2b084167a79f7da2df567 (diff)
Remove emptyFixtureFactory from apex and java
Bug: 183235980 Test: m nothing Change-Id: I350b45e2f57430fb158f4141a566e75de17208cd
Diffstat (limited to 'java/java_test.go')
-rw-r--r--java/java_test.go20
1 files changed, 17 insertions, 3 deletions
diff --git a/java/java_test.go b/java/java_test.go
index 99a96e121..913ed8713 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -48,10 +48,24 @@ func tearDown() {
os.RemoveAll(buildDir)
}
-var emptyFixtureFactory = android.NewFixtureFactory(&buildDir)
+// Legacy factory to use to create fixtures for tests in this package.
+//
+// deprecated: See prepareForJavaTest
+var javaFixtureFactory = android.NewFixtureFactory(
+ &buildDir,
+ prepareForJavaTest,
+)
-// Factory to use to create fixtures for tests in this package.
-var javaFixtureFactory = emptyFixtureFactory.Extend(
+// Legacy preparer used for running tests within the java package.
+//
+// This includes everything that was needed to run any test in the java package prior to the
+// introduction of the test fixtures. Tests that are being converted to use fixtures directly
+// rather than through the testJava...() methods should avoid using this and instead use the
+// various preparers directly, using android.GroupFixturePreparers(...) to group them when
+// necessary.
+//
+// deprecated
+var prepareForJavaTest = android.GroupFixturePreparers(
genrule.PrepareForTestWithGenRuleBuildComponents,
// Get the CC build components but not default modules.
cc.PrepareForTestWithCcBuildComponents,