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
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user