Replace android.BuildOs with Config.BuildOS
Replace the android.BuildOs constant with Config.BuildOS so that it
can vary based on the product config.
Bug: 190084016
Test: all Soong tests
Change-Id: Ia67f872d8b2ab788747a22e3a9659dc21c9775cd
diff --git a/java/java_test.go b/java/java_test.go
index 0f9965d..b6780c2 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -441,7 +441,7 @@
}
`)
- buildOS := android.BuildOs.String()
+ buildOS := ctx.Config().BuildOS.String()
bar := ctx.ModuleForTests("bar", buildOS+"_common")
barJar := bar.Output("bar.jar").Output.String()
@@ -478,7 +478,7 @@
}
`)
- buildOS := android.BuildOs.String()
+ buildOS := ctx.Config().BuildOS.String()
foo := ctx.ModuleForTests("foo", buildOS+"_common").Module().(*TestHost)
@@ -523,7 +523,7 @@
}
// check that -g is not overridden for host modules
- buildOS := android.BuildOs.String()
+ buildOS := result.Config.BuildOS.String()
hostBinary := result.ModuleForTests("host_binary", buildOS+"_common")
hostJavaFlags := hostBinary.Module().VariablesForTests()["javacFlags"]
if strings.Contains(hostJavaFlags, "-g:source,lines") {
@@ -1371,7 +1371,7 @@
}
`)
- buildOS := android.BuildOs.String()
+ buildOS := ctx.Config().BuildOS.String()
test := ctx.ModuleForTests("foo", buildOS+"_common").Module().(*TestHost)
entries := android.AndroidMkEntriesForTest(t, ctx, test)[0]
@@ -1387,7 +1387,7 @@
}
`)
- buildOS := android.BuildOs.String()
+ buildOS := ctx.Config().BuildOS.String()
module := ctx.ModuleForTests("foo", buildOS+"_common").Module().(*TestHost)
assertDeepEquals(t, "Default installable value should be true.", proptools.BoolPtr(true),
module.properties.Installable)