From 2f6422cb1e0462012c729959556ac55d62f2dc48 Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Thu, 31 Dec 2020 13:42:10 +0000 Subject: [PATCH] Support python binaries in sh_test_host Make the code for data_bins/data_device_binds module-type agnostic. Bug: 176581143 Test: m gen_sdk_test Change-Id: I40e8d4c06f583cae523d97ce63822960872907db --- sh/sh_binary.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/sh/sh_binary.go b/sh/sh_binary.go index 8db33a3a9..18749b533 100644 --- a/sh/sh_binary.go +++ b/sh/sh_binary.go @@ -345,15 +345,8 @@ func (s *ShTest) GenerateAndroidBuildActions(ctx android.ModuleContext) { depTag := ctx.OtherModuleDependencyTag(dep) switch depTag { case shTestDataBinsTag, shTestDataDeviceBinsTag: - if cc, isCc := dep.(*cc.Module); isCc { - s.addToDataModules(ctx, cc.OutputFile().Path().Base(), cc.OutputFile().Path()) - return - } - property := "data_bins" - if depTag == shTestDataDeviceBinsTag { - property = "data_device_bins" - } - ctx.PropertyErrorf(property, "%q of type %q is not supported", dep.Name(), ctx.OtherModuleType(dep)) + path := android.OutputFileForModule(ctx, dep, "") + s.addToDataModules(ctx, path.Base(), path) case shTestDataLibsTag, shTestDataDeviceLibsTag: if cc, isCc := dep.(*cc.Module); isCc { // Copy to an intermediate output directory to append "lib[64]" to the path,