summaryrefslogtreecommitdiff
path: root/rust/rust_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'rust/rust_test.go')
-rw-r--r--rust/rust_test.go16
1 files changed, 12 insertions, 4 deletions
diff --git a/rust/rust_test.go b/rust/rust_test.go
index f07f86bf8..80f693eb6 100644
--- a/rust/rust_test.go
+++ b/rust/rust_test.go
@@ -59,6 +59,7 @@ var rustMockedFiles = android.MockFS{
"liby.so": nil,
"libz.so": nil,
"data.txt": nil,
+ "liblog.map.txt": nil,
}
// testRust returns a TestContext in which a basic environment has been setup.
@@ -77,18 +78,25 @@ func testRustVndk(t *testing.T, bp string) *android.TestContext {
return testRustVndkFs(t, bp, rustMockedFiles)
}
-const vendorVariant = "android_vendor.29_arm64_armv8-a_shared"
+const (
+ sharedVendorVariant = "android_vendor.29_arm64_armv8-a_shared"
+ rlibVendorVariant = "android_vendor.29_arm64_armv8-a_rlib_rlib-std"
+)
func testRustVndkFs(t *testing.T, bp string, fs android.MockFS) *android.TestContext {
+ return testRustVndkFsVersions(t, bp, fs, "current", "current", "29")
+}
+
+func testRustVndkFsVersions(t *testing.T, bp string, fs android.MockFS, device_version, product_version, vndk_version string) *android.TestContext {
skipTestIfOsNotSupported(t)
result := android.GroupFixturePreparers(
prepareForRustTest,
fs.AddToFixture(),
android.FixtureModifyProductVariables(
func(variables android.FixtureProductVariables) {
- variables.DeviceVndkVersion = StringPtr("current")
- variables.ProductVndkVersion = StringPtr("current")
- variables.Platform_vndk_version = StringPtr("29")
+ variables.DeviceVndkVersion = StringPtr(device_version)
+ variables.ProductVndkVersion = StringPtr(product_version)
+ variables.Platform_vndk_version = StringPtr(vndk_version)
},
),
).RunTestWithBp(t, bp)