diff options
author | Martin Stjernholm <mast@google.com> | 2020-01-10 20:32:59 +0000 |
---|---|---|
committer | Martin Stjernholm <mast@google.com> | 2020-01-24 22:09:54 +0000 |
commit | be9d0d21d1293e022499242b54ea52d5d79a1dfb (patch) | |
tree | 60293abbc8f447a71a7f5875a7f1c7808a8256a9 /java/java_test.go | |
parent | f0f747c9492fd4e064abb22dde1de1475cc672db (diff) |
Separate dexpreopt.GlobalSoongConfig to allow independent caching of
it.
Introduce a Once cache for GlobalSoongConfig to allow it to get binary
tool paths from ordinary module dependencies (coming in a future CL)
that are then reused in singletons.
Bug: 145934348
Test: m
Change-Id: I440a09dba7d337965a196527566b0966a18e3653
Diffstat (limited to 'java/java_test.go')
-rw-r--r-- | java/java_test.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/java/java_test.go b/java/java_test.go index a2788cb8e..b4795c065 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -57,7 +57,13 @@ func TestMain(m *testing.M) { } func testConfig(env map[string]string, bp string, fs map[string][]byte) android.Config { - return TestConfig(buildDir, env, bp, fs) + 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 } func testContext() *android.TestContext { |