summaryrefslogtreecommitdiff
path: root/apex/apex_test.go
diff options
context:
space:
mode:
author Artur Satayev <satayev@google.com> 2020-04-27 18:07:06 +0100
committer Artur Satayev <satayev@google.com> 2020-05-04 18:01:11 +0100
commita8bd113a695dfb77695cdff7f72719a08869fc23 (patch)
tree445c73a0cf0e6dce162f86abd998f7df05e2cc4e /apex/apex_test.go
parent872a144dca543f40ee232f26e0233e580d97e86d (diff)
Introduce flat deps info list.
Compared to full list, flat list drops dependency edges and simply lists all transitive dependencies for a top-level apex bundle. Bug: 149622332 Test: m, manually build flatlist Change-Id: Ibd521c96b7aeab90b95965c1b524e0a0152aaf5a
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go31
1 files changed, 21 insertions, 10 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index d52054479..de04dce2f 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -504,12 +504,19 @@ func TestBasicApex(t *testing.T) {
ensureListContains(t, noticeInputs, "custom_notice")
ensureListContains(t, noticeInputs, "custom_notice_for_static_lib")
- depsInfo := strings.Split(ctx.ModuleForTests("myapex", "android_common_myapex_image").Output("depsinfo/fulllist.txt").Args["content"], "\\n")
- ensureListContains(t, depsInfo, "myjar <- myapex")
- ensureListContains(t, depsInfo, "mylib <- myapex")
- ensureListContains(t, depsInfo, "mylib2 <- mylib")
- ensureListContains(t, depsInfo, "myotherjar <- myjar")
- ensureListContains(t, depsInfo, "mysharedjar (external) <- myjar")
+ fullDepsInfo := strings.Split(ctx.ModuleForTests("myapex", "android_common_myapex_image").Output("depsinfo/fulllist.txt").Args["content"], "\\n")
+ ensureListContains(t, fullDepsInfo, "myjar <- myapex")
+ ensureListContains(t, fullDepsInfo, "mylib <- myapex")
+ ensureListContains(t, fullDepsInfo, "mylib2 <- mylib")
+ ensureListContains(t, fullDepsInfo, "myotherjar <- myjar")
+ ensureListContains(t, fullDepsInfo, "mysharedjar (external) <- myjar")
+
+ flatDepsInfo := strings.Split(ctx.ModuleForTests("myapex", "android_common_myapex_image").Output("depsinfo/flatlist.txt").Args["content"], "\\n")
+ ensureListContains(t, flatDepsInfo, " myjar")
+ ensureListContains(t, flatDepsInfo, " mylib")
+ ensureListContains(t, flatDepsInfo, " mylib2")
+ ensureListContains(t, flatDepsInfo, " myotherjar")
+ ensureListContains(t, flatDepsInfo, " mysharedjar (external)")
}
func TestDefaults(t *testing.T) {
@@ -818,11 +825,15 @@ 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("depsinfo/fulllist.txt").Args["content"], "\\n")
+ fullDepsInfo := strings.Split(ctx.ModuleForTests("myapex2", "android_common_myapex2_image").Output("depsinfo/fulllist.txt").Args["content"], "\\n")
+ ensureListContains(t, fullDepsInfo, "mylib <- myapex2")
+ ensureListContains(t, fullDepsInfo, "libbaz <- mylib")
+ ensureListContains(t, fullDepsInfo, "libfoo (external) <- mylib")
- ensureListContains(t, depsInfo, "mylib <- myapex2")
- ensureListContains(t, depsInfo, "libbaz <- mylib")
- ensureListContains(t, depsInfo, "libfoo (external) <- mylib")
+ flatDepsInfo := strings.Split(ctx.ModuleForTests("myapex2", "android_common_myapex2_image").Output("depsinfo/flatlist.txt").Args["content"], "\\n")
+ ensureListContains(t, flatDepsInfo, " mylib")
+ ensureListContains(t, flatDepsInfo, " libbaz")
+ ensureListContains(t, flatDepsInfo, " libfoo (external)")
}
func TestApexWithRuntimeLibsDependency(t *testing.T) {