Merge "Convert csuite config to use AndroidMkEntries"

This commit is contained in:
Liz Kammer 2020-11-26 00:05:30 +00:00 committed by Gerrit Code Review
commit 6953adeb95

View file

@ -14,11 +14,6 @@
package android
import (
"fmt"
"io"
)
func init() {
RegisterModuleType("csuite_config", CSuiteConfigFactory)
}
@ -38,22 +33,21 @@ func (me *CSuiteConfig) GenerateAndroidBuildActions(ctx ModuleContext) {
me.OutputFilePath = PathForModuleOut(ctx, me.BaseModuleName()).OutputPath
}
func (me *CSuiteConfig) AndroidMk() AndroidMkData {
androidMkData := AndroidMkData{
func (me *CSuiteConfig) AndroidMkEntries() []AndroidMkEntries {
androidMkEntries := AndroidMkEntries{
Class: "FAKE",
Include: "$(BUILD_SYSTEM)/suite_host_config.mk",
OutputFile: OptionalPathForPath(me.OutputFilePath),
}
androidMkData.Extra = []AndroidMkExtraFunc{
func(w io.Writer, outputFile Path) {
androidMkEntries.ExtraEntries = []AndroidMkExtraEntriesFunc{
func(entries *AndroidMkEntries) {
if me.properties.Test_config != nil {
fmt.Fprintf(w, "LOCAL_TEST_CONFIG := %s\n",
*me.properties.Test_config)
entries.SetString("LOCAL_TEST_CONFIG", *me.properties.Test_config)
}
fmt.Fprintln(w, "LOCAL_COMPATIBILITY_SUITE := csuite")
entries.AddStrings("LOCAL_COMPATIBILITY_SUITE", "csuite")
},
}
return androidMkData
return []AndroidMkEntries{androidMkEntries}
}
func InitCSuiteConfigModule(me *CSuiteConfig) {