summaryrefslogtreecommitdiff
path: root/rust/project_json_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'rust/project_json_test.go')
-rw-r--r--rust/project_json_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/rust/project_json_test.go b/rust/project_json_test.go
index 09d30dbde..bdd54c59b 100644
--- a/rust/project_json_test.go
+++ b/rust/project_json_test.go
@@ -176,6 +176,8 @@ func TestProjectJsonBinary(t *testing.T) {
}
func TestProjectJsonBindGen(t *testing.T) {
+ buildOS := android.TestConfig(t.TempDir(), nil, "", nil).BuildOS
+
bp := `
rust_library {
name: "libd",
@@ -214,9 +216,9 @@ func TestProjectJsonBindGen(t *testing.T) {
if strings.Contains(rootModule, "libbindings1") && !strings.Contains(rootModule, "android_arm64") {
t.Errorf("The source path for libbindings1 does not contain android_arm64, got %v", rootModule)
}
- if strings.Contains(rootModule, "libbindings2") && !strings.Contains(rootModule, android.BuildOs.String()) {
+ if strings.Contains(rootModule, "libbindings2") && !strings.Contains(rootModule, buildOS.String()) {
t.Errorf("The source path for libbindings2 does not contain the BuildOs, got %v; want %v",
- rootModule, android.BuildOs.String())
+ rootModule, buildOS.String())
}
// Check that libbindings1 does not depend on itself.
if strings.Contains(rootModule, "libbindings1") {