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
diff --git a/dexpreopt/dexpreopt_test.go b/dexpreopt/dexpreopt_test.go
index 44bbbc2..d239993 100644
--- a/dexpreopt/dexpreopt_test.go
+++ b/dexpreopt/dexpreopt_test.go
@@ -20,20 +20,20 @@
"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 @@
global.HasSystemOther = true
type moduleTest struct {
- module ModuleConfig
+ module *ModuleConfig
expectedPartition string
}
tests := []struct {