aboutsummaryrefslogtreecommitdiffstats
path: root/apex/apex_test.go
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2019-03-21 06:04:14 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-03-21 06:04:14 +0000
commit21c81326ff4ee6420e73077ce0f05e3cf5565e29 (patch)
treec2123bc6124e582a5dc23c51f03c4c1af05825d4 /apex/apex_test.go
parentefd249e62a873bbaab0ca367710f4bbc47220930 (diff)
parent52818fcde8265fd43ad5f331f57122ecdbe7a6be (diff)
downloadandroid_build_soong-21c81326ff4ee6420e73077ce0f05e3cf5565e29.tar.gz
android_build_soong-21c81326ff4ee6420e73077ce0f05e3cf5565e29.tar.bz2
android_build_soong-21c81326ff4ee6420e73077ce0f05e3cf5565e29.zip
Merge "Notice support for APEX"
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index f221cf22..ac2701f7 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -159,6 +159,8 @@ func testApex(t *testing.T, bp string) *android.TestContext {
"testkey.override.pk8": nil,
"vendor/foo/devkeys/testkey.avbpubkey": nil,
"vendor/foo/devkeys/testkey.pem": nil,
+ "NOTICE": nil,
+ "custom_notice": nil,
})
_, errs := ctx.ParseFileList(".", []string{"Android.bp"})
android.FailIfErrored(t, errs)
@@ -280,6 +282,7 @@ func TestBasicApex(t *testing.T) {
srcs: ["mylib.cpp"],
system_shared_libs: [],
stl: "none",
+ notice: "custom_notice",
}
`)
@@ -319,6 +322,14 @@ func TestBasicApex(t *testing.T) {
if !good {
t.Errorf("Could not find all expected symlinks! foo: %t, foo_link_64: %t. Command was %s", found_foo, found_foo_link_64, copyCmds)
}
+
+ apexMergeNoticeRule := ctx.ModuleForTests("myapex", "android_common_myapex").Rule("apexMergeNoticeRule")
+ noticeInputs := strings.Split(apexMergeNoticeRule.Args["inputs"], " ")
+ if len(noticeInputs) != 3 {
+ t.Errorf("number of input notice files: expected = 3, actual = %d", len(noticeInputs))
+ }
+ ensureListContains(t, noticeInputs, "NOTICE")
+ ensureListContains(t, noticeInputs, "custom_notice")
}
func TestBasicZipApex(t *testing.T) {