Loading apex/apex_test.go +0 −23 Original line number Diff line number Diff line Loading @@ -5399,29 +5399,6 @@ func TestApexMutatorsDontRunIfDisabled(t *testing.T) { } } func TestApexWithJniLibs_Errors(t *testing.T) { testApexError(t, `jni_libs: "xxx" is not a cc_library`, ` apex { name: "myapex", key: "myapex.key", jni_libs: ["xxx"], } apex_key { name: "myapex.key", public_key: "testkey.avbpubkey", private_key: "testkey.pem", } prebuilt_etc { name: "xxx", src: "xxx", } `, withFiles(map[string][]byte{ "xxx": nil, })) } func TestAppBundle(t *testing.T) { ctx, _ := testApex(t, ` apex { Loading sh/sh_binary.go +29 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,12 @@ type shBinaryProperties struct { // install symlinks to the binary Symlinks []string `android:"arch_variant"` // Make this module available when building for ramdisk. Ramdisk_available *bool // Make this module available when building for recovery. Recovery_available *bool } type TestProperties struct { Loading Loading @@ -158,6 +164,29 @@ func (s *ShBinary) Symlinks() []string { return s.properties.Symlinks } var _ android.ImageInterface = (*ShBinary)(nil) func (s *ShBinary) ImageMutatorBegin(ctx android.BaseModuleContext) {} func (s *ShBinary) CoreVariantNeeded(ctx android.BaseModuleContext) bool { return !s.ModuleBase.InstallInRecovery() && !s.ModuleBase.InstallInRamdisk() } func (s *ShBinary) RamdiskVariantNeeded(ctx android.BaseModuleContext) bool { return proptools.Bool(s.properties.Ramdisk_available) || s.ModuleBase.InstallInRamdisk() } func (s *ShBinary) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool { return proptools.Bool(s.properties.Recovery_available) || s.ModuleBase.InstallInRecovery() } func (s *ShBinary) ExtraImageVariations(ctx android.BaseModuleContext) []string { return nil } func (s *ShBinary) SetImageVariation(ctx android.BaseModuleContext, variation string, module android.Module) { } func (s *ShBinary) generateAndroidBuildActions(ctx android.ModuleContext) { s.sourceFilePath = android.PathForModuleSrc(ctx, proptools.String(s.properties.Src)) filename := proptools.String(s.properties.Filename) Loading Loading
apex/apex_test.go +0 −23 Original line number Diff line number Diff line Loading @@ -5399,29 +5399,6 @@ func TestApexMutatorsDontRunIfDisabled(t *testing.T) { } } func TestApexWithJniLibs_Errors(t *testing.T) { testApexError(t, `jni_libs: "xxx" is not a cc_library`, ` apex { name: "myapex", key: "myapex.key", jni_libs: ["xxx"], } apex_key { name: "myapex.key", public_key: "testkey.avbpubkey", private_key: "testkey.pem", } prebuilt_etc { name: "xxx", src: "xxx", } `, withFiles(map[string][]byte{ "xxx": nil, })) } func TestAppBundle(t *testing.T) { ctx, _ := testApex(t, ` apex { Loading
sh/sh_binary.go +29 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,12 @@ type shBinaryProperties struct { // install symlinks to the binary Symlinks []string `android:"arch_variant"` // Make this module available when building for ramdisk. Ramdisk_available *bool // Make this module available when building for recovery. Recovery_available *bool } type TestProperties struct { Loading Loading @@ -158,6 +164,29 @@ func (s *ShBinary) Symlinks() []string { return s.properties.Symlinks } var _ android.ImageInterface = (*ShBinary)(nil) func (s *ShBinary) ImageMutatorBegin(ctx android.BaseModuleContext) {} func (s *ShBinary) CoreVariantNeeded(ctx android.BaseModuleContext) bool { return !s.ModuleBase.InstallInRecovery() && !s.ModuleBase.InstallInRamdisk() } func (s *ShBinary) RamdiskVariantNeeded(ctx android.BaseModuleContext) bool { return proptools.Bool(s.properties.Ramdisk_available) || s.ModuleBase.InstallInRamdisk() } func (s *ShBinary) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool { return proptools.Bool(s.properties.Recovery_available) || s.ModuleBase.InstallInRecovery() } func (s *ShBinary) ExtraImageVariations(ctx android.BaseModuleContext) []string { return nil } func (s *ShBinary) SetImageVariation(ctx android.BaseModuleContext, variation string, module android.Module) { } func (s *ShBinary) generateAndroidBuildActions(ctx android.ModuleContext) { s.sourceFilePath = android.PathForModuleSrc(ctx, proptools.String(s.properties.Src)) filename := proptools.String(s.properties.Filename) Loading