Revert "Preopt APEX system server jars."
This reverts commit ca9bc98e0c
.
Reason for revert: breaks build
Bug: 200024131
Change-Id: Ide07b4c4d267370ae31107b1598b2f878c701282
This commit is contained in:
@@ -33,35 +33,17 @@ func testProductModuleConfig(ctx android.PathContext, name string) *ModuleConfig
|
||||
}
|
||||
|
||||
func testModuleConfig(ctx android.PathContext, name, partition string) *ModuleConfig {
|
||||
return createTestModuleConfig(
|
||||
name,
|
||||
fmt.Sprintf("/%s/app/test/%s.apk", partition, name),
|
||||
android.PathForOutput(ctx, fmt.Sprintf("%s/%s.apk", name, name)),
|
||||
android.PathForOutput(ctx, fmt.Sprintf("%s/dex/%s.jar", name, name)),
|
||||
android.PathForOutput(ctx, fmt.Sprintf("%s/enforce_uses_libraries.status", name)))
|
||||
}
|
||||
|
||||
func testApexModuleConfig(ctx android.PathContext, name, apexName string) *ModuleConfig {
|
||||
return createTestModuleConfig(
|
||||
name,
|
||||
fmt.Sprintf("/apex/%s/javalib/%s.jar", apexName, name),
|
||||
android.PathForOutput(ctx, fmt.Sprintf("%s/dexpreopt/%s.jar", name, name)),
|
||||
android.PathForOutput(ctx, fmt.Sprintf("%s/aligned/%s.jar", name, name)),
|
||||
android.PathForOutput(ctx, fmt.Sprintf("%s/enforce_uses_libraries.status", name)))
|
||||
}
|
||||
|
||||
func createTestModuleConfig(name, dexLocation string, buildPath, dexPath, enforceUsesLibrariesStatusFile android.OutputPath) *ModuleConfig {
|
||||
return &ModuleConfig{
|
||||
Name: name,
|
||||
DexLocation: dexLocation,
|
||||
BuildPath: buildPath,
|
||||
DexPath: dexPath,
|
||||
DexLocation: fmt.Sprintf("/%s/app/test/%s.apk", partition, name),
|
||||
BuildPath: android.PathForOutput(ctx, fmt.Sprintf("%s/%s.apk", name, name)),
|
||||
DexPath: android.PathForOutput(ctx, fmt.Sprintf("%s/dex/%s.jar", name, name)),
|
||||
UncompressedDex: false,
|
||||
HasApkLibraries: false,
|
||||
PreoptFlags: nil,
|
||||
ProfileClassListing: android.OptionalPath{},
|
||||
ProfileIsTextListing: false,
|
||||
EnforceUsesLibrariesStatusFile: enforceUsesLibrariesStatusFile,
|
||||
EnforceUsesLibrariesStatusFile: android.PathForOutput(ctx, fmt.Sprintf("%s/enforce_uses_libraries.status", name)),
|
||||
EnforceUsesLibraries: false,
|
||||
ClassLoaderContexts: nil,
|
||||
Archs: []android.ArchType{android.Arm},
|
||||
@@ -158,29 +140,6 @@ func TestDexPreoptSystemOther(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func TestDexPreoptApexSystemServerJars(t *testing.T) {
|
||||
config := android.TestConfig("out", nil, "", nil)
|
||||
ctx := android.BuilderContextForTesting(config)
|
||||
globalSoong := globalSoongConfigForTests()
|
||||
global := GlobalConfigForTests(ctx)
|
||||
module := testApexModuleConfig(ctx, "service-A", "com.android.apex1")
|
||||
|
||||
global.ApexSystemServerJars = android.CreateTestConfiguredJarList(
|
||||
[]string{"com.android.apex1:service-A"})
|
||||
|
||||
rule, err := GenerateDexpreoptRule(ctx, globalSoong, global, module)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
wantInstalls := android.RuleBuilderInstalls{
|
||||
{android.PathForOutput(ctx, "service-A/dexpreopt/oat/arm/javalib.odex"), "/system/framework/oat/arm/apex@com.android.apex1@javalib@service-A.jar@classes.odex"},
|
||||
{android.PathForOutput(ctx, "service-A/dexpreopt/oat/arm/javalib.vdex"), "/system/framework/oat/arm/apex@com.android.apex1@javalib@service-A.jar@classes.vdex"},
|
||||
}
|
||||
|
||||
android.AssertStringEquals(t, "installs", wantInstalls.String(), rule.Installs().String())
|
||||
}
|
||||
|
||||
func TestDexPreoptProfile(t *testing.T) {
|
||||
config := android.TestConfig("out", nil, "", nil)
|
||||
ctx := android.BuilderContextForTesting(config)
|
||||
|
Reference in New Issue
Block a user