diff options
author | 2020-04-30 10:08:33 +0800 | |
---|---|---|
committer | 2020-05-07 12:35:14 +0800 | |
commit | 1e3fdcd1822fc831e5efdf4f566f39442a56023b (patch) | |
tree | 155723876a7621c75f84d61145de24cf5eca6316 /tradefed | |
parent | b407131a0ef69ebd5ec04d49d92735b1af18778f (diff) |
Add test_mainline_modules to the auto-gen test config(GTest only).
To support parameterized mainline modules in Test Mapping, we plan to
add a new parameter called test_mainline_modules in build system to
auto-generate the test config based on the parameter.
For detailed information: go/test-mapping-mainline-gcl
(serach for auto-generated pattern)
Bug: 155238134
Test: add "test_mainline_modules: [some.apk]" to libstatspull_test,
and build the modules, confirm the parameterized option is added
in the test config.
Change-Id: I31d6dfbb71881d7a7026cf2f36ba6ca6a97870ad
Diffstat (limited to 'tradefed')
-rw-r--r-- | tradefed/autogen.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tradefed/autogen.go b/tradefed/autogen.go index a46dce931..596284beb 100644 --- a/tradefed/autogen.go +++ b/tradefed/autogen.go @@ -64,12 +64,16 @@ type Config interface { type Option struct { Name string + Key string Value string } var _ Config = Option{} func (o Option) Config() string { + if o.Key != "" { + return fmt.Sprintf(`<option name="%s" key="%s" value="%s" />`, o.Name, o.Key, o.Value) + } return fmt.Sprintf(`<option name="%s" value="%s" />`, o.Name, o.Value) } |