From 0c66bc615b399d2201b15b4c9052066db04a3f5e Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 20 Jul 2021 09:47:41 -0700 Subject: 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 --- sdk/sdk_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sdk/sdk_test.go') diff --git a/sdk/sdk_test.go b/sdk/sdk_test.go index 97fb2485f..85e3d875e 100644 --- a/sdk/sdk_test.go +++ b/sdk/sdk_test.go @@ -15,19 +15,21 @@ package sdk import ( - "android/soong/android" "log" "os" + "runtime" "testing" + "android/soong/android" + "github.com/google/blueprint/proptools" ) // Needed in an _test.go file in this package to ensure tests run correctly, particularly in IDE. func TestMain(m *testing.M) { - if android.BuildOs != android.Linux { + if runtime.GOOS != "linux" { // b/145598135 - Generating host snapshots for anything other than linux is not supported. - log.Printf("Skipping as sdk snapshot generation is only supported on %s not %s", android.Linux, android.BuildOs) + log.Printf("Skipping as sdk snapshot generation is only supported on linux not %s", runtime.GOOS) os.Exit(0) } -- cgit v1.2.3-59-g8ed1b