Merge "Allow createGlobalSoongConfig() to be used from tests"

This commit is contained in:
Paul Duffin
2021-01-22 17:42:00 +00:00
committed by Gerrit Code Review
4 changed files with 15 additions and 34 deletions

View File

@@ -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 {