Add filename property to prebuilt_etc

filename property is an optional property that specifies the name of the
installed file which is by default name of the module.

This will be used to APEXs to have ./etc/ld.config.txt files for their
own.

Test: m (prebuilt_etc_test.go added)
Change-Id: Ic8d0c0044c5bc2c6c33117fe2c19ef6ad75451a8
This commit is contained in:
Jiyong Park
2018-10-26 21:49:39 +09:00
parent 397e55e0cf
commit 139a2e6935
3 changed files with 25 additions and 2 deletions

View File

@@ -91,3 +91,18 @@ func TestPrebuiltEtcVariants(t *testing.T) {
t.Errorf("expected 1, got %#v", bar_variants)
}
}
func TestPrebuiltEtcOutputPath(t *testing.T) {
ctx := testPrebuiltEtc(t, `
prebuilt_etc {
name: "foo.conf",
src: "foo.conf",
filename: "foo.installed.conf",
}
`)
p := ctx.ModuleForTests("foo.conf", "android_common_core").Module().(*PrebuiltEtc)
if p.outputFilePath.Base() != "foo.installed.conf" {
t.Errorf("expected foo.installed.conf, got %q", p.outputFilePath.Base())
}
}