Merge "Revert "m <apex_name>-deps-info prints the internal/external deps of the APEX""

This commit is contained in:
Jiyong Park
2020-01-09 02:20:42 +00:00
committed by Gerrit Code Review
8 changed files with 13 additions and 117 deletions

View File

@@ -219,7 +219,6 @@ func testApexContext(t *testing.T, bp string, handlers ...testCustomizer) (*andr
"apex_manifest.json": nil,
"AndroidManifest.xml": nil,
"system/sepolicy/apex/myapex-file_contexts": nil,
"system/sepolicy/apex/myapex2-file_contexts": nil,
"system/sepolicy/apex/otherapex-file_contexts": nil,
"system/sepolicy/apex/commonapex-file_contexts": nil,
"system/sepolicy/apex/com.android.vndk-file_contexts": nil,
@@ -521,12 +520,6 @@ func TestBasicApex(t *testing.T) {
}
ensureListContains(t, noticeInputs, "NOTICE")
ensureListContains(t, noticeInputs, "custom_notice")
depsInfo := strings.Split(ctx.ModuleForTests("myapex", "android_common_myapex_image").Output("myapex-deps-info.txt").Args["content"], "\\n")
ensureListContains(t, depsInfo, "internal myjar")
ensureListContains(t, depsInfo, "internal mylib")
ensureListContains(t, depsInfo, "internal mylib2")
ensureListContains(t, depsInfo, "internal myotherjar")
}
func TestDefaults(t *testing.T) {
@@ -747,13 +740,13 @@ func TestApexWithStubs(t *testing.T) {
func TestApexWithExplicitStubsDependency(t *testing.T) {
ctx, _ := testApex(t, `
apex {
name: "myapex2",
key: "myapex2.key",
name: "myapex",
key: "myapex.key",
native_shared_libs: ["mylib"],
}
apex_key {
name: "myapex2.key",
name: "myapex.key",
public_key: "testkey.avbpubkey",
private_key: "testkey.pem",
}
@@ -786,7 +779,7 @@ func TestApexWithExplicitStubsDependency(t *testing.T) {
`)
apexRule := ctx.ModuleForTests("myapex2", "android_common_myapex2_image").Rule("apexRule")
apexRule := ctx.ModuleForTests("myapex", "android_common_myapex_image").Rule("apexRule")
copyCmds := apexRule.Args["copy_commands"]
// Ensure that direct non-stubs dep is always included
@@ -798,7 +791,7 @@ func TestApexWithExplicitStubsDependency(t *testing.T) {
// Ensure that dependency of stubs is not included
ensureNotContains(t, copyCmds, "image.apex/lib64/libbar.so")
mylibLdFlags := ctx.ModuleForTests("mylib", "android_arm64_armv8-a_shared_myapex2").Rule("ld").Args["libFlags"]
mylibLdFlags := ctx.ModuleForTests("mylib", "android_arm64_armv8-a_shared_myapex").Rule("ld").Args["libFlags"]
// Ensure that mylib is linking with version 10 of libfoo
ensureContains(t, mylibLdFlags, "libfoo/android_arm64_armv8-a_shared_10/libfoo.so")
@@ -809,12 +802,6 @@ func TestApexWithExplicitStubsDependency(t *testing.T) {
// Ensure that libfoo stubs is not linking to libbar (since it is a stubs)
ensureNotContains(t, libFooStubsLdFlags, "libbar.so")
depsInfo := strings.Split(ctx.ModuleForTests("myapex2", "android_common_myapex2_image").Output("myapex2-deps-info.txt").Args["content"], "\\n")
ensureListContains(t, depsInfo, "internal mylib")
ensureListContains(t, depsInfo, "external libfoo")
ensureListNotContains(t, depsInfo, "internal libfoo")
ensureListNotContains(t, depsInfo, "external mylib")
}
func TestApexWithRuntimeLibsDependency(t *testing.T) {
@@ -2665,7 +2652,7 @@ func TestInstallExtraFlattenedApexes(t *testing.T) {
config.TestProductVariables.InstallExtraFlattenedApexes = proptools.BoolPtr(true)
})
ab := ctx.ModuleForTests("myapex", "android_common_myapex_image").Module().(*apexBundle)
ensureListContains(t, ab.requiredDeps, "myapex.flattened")
ensureListContains(t, ab.externalDeps, "myapex.flattened")
mk := android.AndroidMkDataForTest(t, config, "", ab)
var builder strings.Builder
mk.Custom(&builder, ab.Name(), "TARGET_", "", mk)