Revert "Separate dexpreopt.GlobalSoongConfig to allow independen..."

Revert submission 1211982-dex2oat-soong-dep

Reason for revert: Build failures. See b/148312086.

Reverted Changes:
Ibc427a9a8: Make dex2oat(d) visible for use as implicit dexpre...
I71df11c1e: Move the Once cache for dexpreopt.GlobalConfig int...
I38317f2d5: Get the dex2oat host tool path from module depende...
I440a09dba: Separate dexpreopt.GlobalSoongConfig to allow inde...

Bug: 148312086
Bug: 145934348
Exempt-From-Owner-Approval: Plain revert
Change-Id: Ice3990225635a737e49e9aed7373f06516fccea3
This commit is contained in:
Hans Boehm
2020-01-25 01:44:30 +00:00
committed by Martin Stjernholm
parent 453bf09853
commit e4b5342d43
8 changed files with 61 additions and 104 deletions

View File

@@ -61,13 +61,10 @@ func testModuleConfig(ctx android.PathContext, name, partition string) ModuleCon
}
func TestDexPreopt(t *testing.T) {
config := android.TestConfig("out", nil, "", nil)
ctx := android.PathContextForTesting(config)
globalSoong := GlobalSoongConfigForTests(config)
global := GlobalConfigForTests(ctx)
module := testSystemModuleConfig(ctx, "test")
ctx := android.PathContextForTesting(android.TestConfig("out", nil, "", nil))
global, module := GlobalConfigForTests(ctx), testSystemModuleConfig(ctx, "test")
rule, err := GenerateDexpreoptRule(ctx, globalSoong, global, module)
rule, err := GenerateDexpreoptRule(ctx, global, module)
if err != nil {
t.Fatal(err)
}
@@ -83,9 +80,7 @@ func TestDexPreopt(t *testing.T) {
}
func TestDexPreoptSystemOther(t *testing.T) {
config := android.TestConfig("out", nil, "", nil)
ctx := android.PathContextForTesting(config)
globalSoong := GlobalSoongConfigForTests(config)
ctx := android.PathContextForTesting(android.TestConfig("out", nil, "", nil))
global := GlobalConfigForTests(ctx)
systemModule := testSystemModuleConfig(ctx, "Stest")
systemProductModule := testSystemProductModuleConfig(ctx, "SPtest")
@@ -123,7 +118,7 @@ func TestDexPreoptSystemOther(t *testing.T) {
for _, test := range tests {
global.PatternsOnSystemOther = test.patterns
for _, mt := range test.moduleTests {
rule, err := GenerateDexpreoptRule(ctx, globalSoong, global, mt.module)
rule, err := GenerateDexpreoptRule(ctx, global, mt.module)
if err != nil {
t.Fatal(err)
}
@@ -143,15 +138,12 @@ func TestDexPreoptSystemOther(t *testing.T) {
}
func TestDexPreoptProfile(t *testing.T) {
config := android.TestConfig("out", nil, "", nil)
ctx := android.PathContextForTesting(config)
globalSoong := GlobalSoongConfigForTests(config)
global := GlobalConfigForTests(ctx)
module := testSystemModuleConfig(ctx, "test")
ctx := android.PathContextForTesting(android.TestConfig("out", nil, "", nil))
global, module := GlobalConfigForTests(ctx), testSystemModuleConfig(ctx, "test")
module.ProfileClassListing = android.OptionalPathForPath(android.PathForTesting("profile"))
rule, err := GenerateDexpreoptRule(ctx, globalSoong, global, module)
rule, err := GenerateDexpreoptRule(ctx, global, module)
if err != nil {
t.Fatal(err)
}