Pass dexpreopt config structs by reference.

Should cut down on a bit of copying, and also required for an upcoming
CL that'll change GetCachedGlobalSoongConfig.

Test: m nothing
Bug: 145934348
Change-Id: I6bed737d9b061b5239cc603ad881f4ccd4312e43
This commit is contained in:
Martin Stjernholm
2020-01-31 17:44:54 +00:00
parent d90676fdde
commit 8d80ceeb12
5 changed files with 45 additions and 45 deletions

View File

@@ -20,20 +20,20 @@ import (
"testing"
)
func testSystemModuleConfig(ctx android.PathContext, name string) ModuleConfig {
func testSystemModuleConfig(ctx android.PathContext, name string) *ModuleConfig {
return testModuleConfig(ctx, name, "system")
}
func testSystemProductModuleConfig(ctx android.PathContext, name string) ModuleConfig {
func testSystemProductModuleConfig(ctx android.PathContext, name string) *ModuleConfig {
return testModuleConfig(ctx, name, "system/product")
}
func testProductModuleConfig(ctx android.PathContext, name string) ModuleConfig {
func testProductModuleConfig(ctx android.PathContext, name string) *ModuleConfig {
return testModuleConfig(ctx, name, "product")
}
func testModuleConfig(ctx android.PathContext, name, partition string) ModuleConfig {
return ModuleConfig{
func testModuleConfig(ctx android.PathContext, name, partition string) *ModuleConfig {
return &ModuleConfig{
Name: name,
DexLocation: fmt.Sprintf("/%s/app/test/%s.apk", partition, name),
BuildPath: android.PathForOutput(ctx, fmt.Sprintf("%s/%s.apk", name, name)),
@@ -94,7 +94,7 @@ func TestDexPreoptSystemOther(t *testing.T) {
global.HasSystemOther = true
type moduleTest struct {
module ModuleConfig
module *ModuleConfig
expectedPartition string
}
tests := []struct {