diff options
author | Paul Duffin <paulduffin@google.com> | 2021-01-21 15:05:11 +0000 |
---|---|---|
committer | Paul Duffin <paulduffin@google.com> | 2021-01-21 15:44:30 +0000 |
commit | 9f04524673e84f9be7f06e2e13266d8fda2f151f (patch) | |
tree | 98613bac182bf23bd10184c7f2f73da524bfddd2 /java/java_test.go | |
parent | c059c8c9a05e28b5d3782464f01c493047a64d21 (diff) |
Allow createGlobalSoongConfig() to be used from tests
Previously, the createGlobalSoongConfig() function was explicitly
prevented from being used in tests because it would fail. However, it
turns out that is no longer the case and it does now work.
That allows the following changes to be made:
* Tests no longer need to use GlobalSoongConfigForTests() to
prepopulate the cache.
* GlobalSoongConfigForTests() is only needed in the dexpreopt
package.
Bug: 177892522
Test: m nothing
Change-Id: Ifcbb1a44254c5d2d10c1d02ab23227488d1d1ed1
Diffstat (limited to 'java/java_test.go')
-rw-r--r-- | java/java_test.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/java/java_test.go b/java/java_test.go index 2a23f371e..7b8984810 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -61,13 +61,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(config android.Config) *android.TestContext { |