Convert csuite config to use AndroidMkEntries
This is to facilitate consolidation of compatibility suite logic. Test: m nothing and compare soong Android mk files -- no diffs Change-Id: Ibc60d14fdde93835124e18a5c484bbda496bdb9e
This commit is contained in:
parent
e5218b6be6
commit
e2a17a5a40
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue