From c0083614f6ed11ceb0ae71ed4cf4b08667be3e4b Mon Sep 17 00:00:00 2001 From: Ivan Lozano Date: Tue, 3 Sep 2019 13:49:39 -0700 Subject: [PATCH] Do not run Soong tests for Rust on non-Linux hosts. The Rust toolchain only supports Linux hosts, so skip Rust tests that depend on host toolchains when building on other platforms. Test: Tests still run on Linux hosts Bug: 140435149 Change-Id: I298b52589ab5c6a7ec3acc4db1111596cd995d76 --- rust/rust_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rust/rust_test.go b/rust/rust_test.go index c68cfe7c9..f7c96dd6a 100644 --- a/rust/rust_test.go +++ b/rust/rust_test.go @@ -17,6 +17,7 @@ package rust import ( "io/ioutil" "os" + "runtime" "testing" "android/soong/android" @@ -50,6 +51,11 @@ func TestMain(m *testing.M) { } func testRust(t *testing.T, bp string) *android.TestContext { + // TODO (b/140435149) + if runtime.GOOS != "linux" { + t.Skip("Only the Linux toolchain is supported for Rust") + } + t.Helper() config := android.TestArchConfig(buildDir, nil) @@ -66,6 +72,11 @@ func testRust(t *testing.T, bp string) *android.TestContext { } func testRustError(t *testing.T, pattern string, bp string) { + // TODO (b/140435149) + if runtime.GOOS != "linux" { + t.Skip("Only the Linux toolchain is supported for Rust") + } + t.Helper() config := android.TestArchConfig(buildDir, nil)