summaryrefslogtreecommitdiff
path: root/java/java_test.go
diff options
context:
space:
mode:
author Martin Stjernholm <mast@google.com> 2020-01-27 13:47:31 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2020-01-27 13:47:31 +0000
commit699cf17f537f76eb1a5aa034375e7b92751329c3 (patch)
treea2eb7975124fa231b644940ab91c5cda798ef5e6 /java/java_test.go
parentcf0bba7a30dc9bbe17c11a238d1f88e56c77e53b (diff)
parente4b5342d43d544871257c0422d52cdcad323eb5e (diff)
Merge changes from topic "revert-1211982-dex2oat-soong-dep-LLLKNULXYJ"
* changes: Revert "Separate dexpreopt.GlobalSoongConfig to allow independen..." Revert "Move the Once cache for dexpreopt.GlobalConfig into the ..." Revert "Get the dex2oat host tool path from module dependency on..."
Diffstat (limited to 'java/java_test.go')
-rw-r--r--java/java_test.go16
1 files changed, 3 insertions, 13 deletions
diff --git a/java/java_test.go b/java/java_test.go
index b724b4de2..a2788cb8e 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -57,15 +57,7 @@ func TestMain(m *testing.M) {
}
func testConfig(env map[string]string, bp string, fs map[string][]byte) android.Config {
- bp += dexpreopt.BpToolModulesForTest()
-
- config := TestConfig(buildDir, env, bp, fs)
-
- // Set up the global Once cache used for dexpreopt.GlobalSoongConfig, so that
- // it doesn't create a real one, which would fail.
- _ = dexpreopt.GlobalSoongConfigForTests(config)
-
- return config
+ return TestConfig(buildDir, env, bp, fs)
}
func testContext() *android.TestContext {
@@ -94,8 +86,6 @@ func testContext() *android.TestContext {
cc.RegisterRequiredBuildComponentsForTest(ctx)
ctx.RegisterModuleType("ndk_prebuilt_shared_stl", cc.NdkPrebuiltSharedStlFactory)
- dexpreopt.RegisterToolModulesForTest(ctx)
-
return ctx
}
@@ -103,7 +93,7 @@ func run(t *testing.T, ctx *android.TestContext, config android.Config) {
t.Helper()
pathCtx := android.PathContextForTesting(config)
- dexpreopt.SetTestGlobalConfig(config, dexpreopt.GlobalConfigForTests(pathCtx))
+ setDexpreoptTestGlobalConfig(config, dexpreopt.GlobalConfigForTests(pathCtx))
ctx.Register(config)
_, errs := ctx.ParseBlueprintsFiles("Android.bp")
@@ -122,7 +112,7 @@ func testJavaErrorWithConfig(t *testing.T, pattern string, config android.Config
ctx := testContext()
pathCtx := android.PathContextForTesting(config)
- dexpreopt.SetTestGlobalConfig(config, dexpreopt.GlobalConfigForTests(pathCtx))
+ setDexpreoptTestGlobalConfig(config, dexpreopt.GlobalConfigForTests(pathCtx))
ctx.Register(config)
_, errs := ctx.ParseBlueprintsFiles("Android.bp")