summaryrefslogtreecommitdiff
path: root/sdk/sdk_test.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2021-07-20 09:47:41 -0700
committer Colin Cross <ccross@android.com> 2021-07-20 12:46:48 -0700
commit0c66bc615b399d2201b15b4c9052066db04a3f5e (patch)
treebe8334e4662f4bf137d2231dc92755e44fc85d5e /sdk/sdk_test.go
parentae86338676084cf5966adf99f34e7086f9687edc (diff)
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
Diffstat (limited to 'sdk/sdk_test.go')
-rw-r--r--sdk/sdk_test.go8
1 files changed, 5 insertions, 3 deletions
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)
}