diff options
author | Cole Faust <colefaust@google.com> | 2022-12-07 18:18:37 -0800 |
---|---|---|
committer | Cole Faust <colefaust@google.com> | 2022-12-09 15:23:26 -0800 |
commit | 8ec823cba166a41eb0e9e5ff8fe679e691fec678 (patch) | |
tree | f293a018289e7466302470e68e706b5c1b904894 /sh | |
parent | 3784d144047e567e0740a0eda5c6693bc126e2bf (diff) | |
download | soong-8ec823cba166a41eb0e9e5ff8fe679e691fec678.tar.gz |
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
Diffstat (limited to 'sh')
-rw-r--r-- | sh/sh_binary.go | 12 |
1 files changed, 10 insertions, 2 deletions
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) { |