Loading etc/prebuilt_etc.go +12 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ func RegisterPrebuiltEtcBuildComponents(ctx android.RegistrationContext) { ctx.RegisterModuleType("prebuilt_root_host", PrebuiltRootHostFactory) ctx.RegisterModuleType("prebuilt_usr_share", PrebuiltUserShareFactory) ctx.RegisterModuleType("prebuilt_usr_share_host", PrebuiltUserShareHostFactory) ctx.RegisterModuleType("prebuilt_usr_hyphendata", PrebuiltUserHyphenDataFactory) ctx.RegisterModuleType("prebuilt_font", PrebuiltFontFactory) ctx.RegisterModuleType("prebuilt_firmware", PrebuiltFirmwareFactory) ctx.RegisterModuleType("prebuilt_dsp", PrebuiltDSPFactory) Loading Loading @@ -611,6 +612,17 @@ func PrebuiltUserShareHostFactory() android.Module { return module } // prebuilt_usr_hyphendata is for a prebuilt artifact that is installed in // <partition>/usr/hyphen-data/<sub_dir> directory. func PrebuiltUserHyphenDataFactory() android.Module { module := &PrebuiltEtc{} InitPrebuiltEtcModule(module, "usr/hyphen-data") // This module is device-only android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibFirst) android.InitDefaultableModule(module) return module } // prebuilt_font installs a font in <partition>/fonts directory. func PrebuiltFontFactory() android.Module { module := &PrebuiltEtc{} Loading etc/prebuilt_etc_test.go +14 −0 Original line number Diff line number Diff line Loading @@ -287,6 +287,20 @@ func TestPrebuiltUserShareHostInstallDirPath(t *testing.T) { android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPath) } func TestPrebuiltPrebuiltUserHyphenDataInstallDirPath(t *testing.T) { result := prepareForPrebuiltEtcTest.RunTestWithBp(t, ` prebuilt_usr_hyphendata { name: "foo.conf", src: "foo.conf", sub_dir: "bar", } `) p := result.Module("foo.conf", "android_arm64_armv8-a").(*PrebuiltEtc) expected := "out/soong/target/product/test_device/system/usr/hyphen-data/bar" android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPath) } func TestPrebuiltFontInstallDirPath(t *testing.T) { result := prepareForPrebuiltEtcTest.RunTestWithBp(t, ` prebuilt_font { Loading Loading
etc/prebuilt_etc.go +12 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ func RegisterPrebuiltEtcBuildComponents(ctx android.RegistrationContext) { ctx.RegisterModuleType("prebuilt_root_host", PrebuiltRootHostFactory) ctx.RegisterModuleType("prebuilt_usr_share", PrebuiltUserShareFactory) ctx.RegisterModuleType("prebuilt_usr_share_host", PrebuiltUserShareHostFactory) ctx.RegisterModuleType("prebuilt_usr_hyphendata", PrebuiltUserHyphenDataFactory) ctx.RegisterModuleType("prebuilt_font", PrebuiltFontFactory) ctx.RegisterModuleType("prebuilt_firmware", PrebuiltFirmwareFactory) ctx.RegisterModuleType("prebuilt_dsp", PrebuiltDSPFactory) Loading Loading @@ -611,6 +612,17 @@ func PrebuiltUserShareHostFactory() android.Module { return module } // prebuilt_usr_hyphendata is for a prebuilt artifact that is installed in // <partition>/usr/hyphen-data/<sub_dir> directory. func PrebuiltUserHyphenDataFactory() android.Module { module := &PrebuiltEtc{} InitPrebuiltEtcModule(module, "usr/hyphen-data") // This module is device-only android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibFirst) android.InitDefaultableModule(module) return module } // prebuilt_font installs a font in <partition>/fonts directory. func PrebuiltFontFactory() android.Module { module := &PrebuiltEtc{} Loading
etc/prebuilt_etc_test.go +14 −0 Original line number Diff line number Diff line Loading @@ -287,6 +287,20 @@ func TestPrebuiltUserShareHostInstallDirPath(t *testing.T) { android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPath) } func TestPrebuiltPrebuiltUserHyphenDataInstallDirPath(t *testing.T) { result := prepareForPrebuiltEtcTest.RunTestWithBp(t, ` prebuilt_usr_hyphendata { name: "foo.conf", src: "foo.conf", sub_dir: "bar", } `) p := result.Module("foo.conf", "android_arm64_armv8-a").(*PrebuiltEtc) expected := "out/soong/target/product/test_device/system/usr/hyphen-data/bar" android.AssertPathRelativeToTopEquals(t, "install dir", expected, p.installDirPath) } func TestPrebuiltFontInstallDirPath(t *testing.T) { result := prepareForPrebuiltEtcTest.RunTestWithBp(t, ` prebuilt_font { Loading