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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user