From 8ec823cba166a41eb0e9e5ff8fe679e691fec678 Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Wed, 7 Dec 2022 18:18:37 -0800 Subject: Allow adding extra tradefed options in the Android.bp file Some tests need to add custom tradefed options, but still want to keep most of the soong autogenerated tradefed xml file. Expose a test_options: { tradefed_options: [...] } property that will allow tests to add more options to the autogenerated xml file. Fixes: 184895128 Test: go test, and verified that the ninja files did not change for aosp_arm64 Change-Id: I75f7eb002c8325ce7cdc76e12e76e16195320620 --- sh/sh_binary.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sh/sh_binary.go') diff --git a/sh/sh_binary.go b/sh/sh_binary.go index 96273297a..4eae397a6 100644 --- a/sh/sh_binary.go +++ b/sh/sh_binary.go @@ -379,8 +379,16 @@ func (s *ShTest) GenerateAndroidBuildActions(ctx android.ModuleContext) { } configs = append(configs, tradefed.Object{"target_preparer", "com.android.tradefed.targetprep.PushFilePreparer", options}) } - s.testConfig = tradefed.AutoGenShellTestConfig(ctx, s.testProperties.Test_config, - s.testProperties.Test_config_template, s.testProperties.Test_suites, configs, s.testProperties.Auto_gen_config, s.outputFilePath.Base()) + s.testConfig = tradefed.NewMaybeAutoGenTestConfigBuilder(ctx). + SetTestConfigProp(s.testProperties.Test_config). + SetTestTemplateConfigProp(s.testProperties.Test_config_template). + SetTestSuites(s.testProperties.Test_suites). + SetConfig(configs). + SetAutoGenConfig(s.testProperties.Auto_gen_config). + SetOutputFileName(s.outputFilePath.Base()). + SetDeviceTemplate("${ShellTestConfigTemplate}"). + SetHostTemplate("${ShellTestConfigTemplate}"). + Build() s.dataModules = make(map[string]android.Path) ctx.VisitDirectDeps(func(dep android.Module) { -- cgit v1.2.3-59-g8ed1b