blob: 9dd696f7586387b159dc9ce7ea7b025f22b02d39 [file] [log] [blame]
Inseob Kimc0907f12019-02-08 21:00:45 +09001// Copyright (C) 2019 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package sysprop
16
17import (
Paul Duffin9cbbbb82021-03-18 00:21:03 +000018 "os"
19 "strings"
20 "testing"
Paul Duffin7b3de8f2020-03-30 18:00:25 +010021
Inseob Kimc0907f12019-02-08 21:00:45 +090022 "android/soong/android"
23 "android/soong/cc"
24 "android/soong/java"
Andrew Walbrana5deb732024-02-15 13:39:46 +000025 "android/soong/rust"
Inseob Kimc0907f12019-02-08 21:00:45 +090026
Inseob Kimc0907f12019-02-08 21:00:45 +090027 "github.com/google/blueprint/proptools"
28)
29
Inseob Kimc0907f12019-02-08 21:00:45 +090030func TestMain(m *testing.M) {
Paul Duffin9cbbbb82021-03-18 00:21:03 +000031 os.Exit(m.Run())
Inseob Kimc0907f12019-02-08 21:00:45 +090032}
33
Paul Duffin9cbbbb82021-03-18 00:21:03 +000034func test(t *testing.T, bp string) *android.TestResult {
Colin Cross98be1bb2019-12-13 20:41:13 -080035 t.Helper()
Colin Cross98be1bb2019-12-13 20:41:13 -080036
Jiyong Park5e914b22021-03-08 10:09:52 +090037 bp += `
38 cc_library {
39 name: "libbase",
40 host_supported: true,
41 }
42
43 cc_library_headers {
44 name: "libbase_headers",
45 vendor_available: true,
Justin Yunaf1fde42023-09-27 16:22:10 +090046 product_available: true,
Jiyong Park5e914b22021-03-08 10:09:52 +090047 recovery_available: true,
48 }
49
Jiyong Park5e914b22021-03-08 10:09:52 +090050 java_library {
51 name: "sysprop-library-stub-platform",
52 sdk_version: "core_current",
53 }
54
55 java_library {
56 name: "sysprop-library-stub-vendor",
57 soc_specific: true,
58 sdk_version: "core_current",
59 }
60
61 java_library {
62 name: "sysprop-library-stub-product",
63 product_specific: true,
64 sdk_version: "core_current",
65 }
Andrew Walbrana5deb732024-02-15 13:39:46 +000066
67 rust_library {
68 name: "librustutils",
69 crate_name: "rustutils",
70 srcs: ["librustutils/lib.rs"],
71 product_available: true,
72 vendor_available: true,
73 min_sdk_version: "29",
74 }
Jiyong Park5e914b22021-03-08 10:09:52 +090075 `
76
Paul Duffin9cbbbb82021-03-18 00:21:03 +000077 mockFS := android.MockFS{
Inseob Kim42882742019-07-30 17:55:33 +090078 "a.java": nil,
79 "b.java": nil,
80 "c.java": nil,
81 "d.cpp": nil,
82 "api/sysprop-platform-current.txt": nil,
83 "api/sysprop-platform-latest.txt": nil,
84 "api/sysprop-platform-on-product-current.txt": nil,
85 "api/sysprop-platform-on-product-latest.txt": nil,
86 "api/sysprop-vendor-current.txt": nil,
87 "api/sysprop-vendor-latest.txt": nil,
Inseob Kimfe612182020-10-20 16:29:55 +090088 "api/sysprop-vendor-on-product-current.txt": nil,
89 "api/sysprop-vendor-on-product-latest.txt": nil,
Inseob Kim42882742019-07-30 17:55:33 +090090 "api/sysprop-odm-current.txt": nil,
91 "api/sysprop-odm-latest.txt": nil,
92 "framework/aidl/a.aidl": nil,
Inseob Kimc0907f12019-02-08 21:00:45 +090093
94 // For framework-res, which is an implicit dependency for framework
Dan Willemsen412160e2019-04-09 21:36:26 -070095 "AndroidManifest.xml": nil,
96 "build/make/target/product/security/testkey": nil,
Inseob Kimc0907f12019-02-08 21:00:45 +090097
98 "build/soong/scripts/jar-wrapper.sh": nil,
99
Inseob Kimc0907f12019-02-08 21:00:45 +0900100 "jdk8/jre/lib/jce.jar": nil,
101 "jdk8/jre/lib/rt.jar": nil,
102 "jdk8/lib/tools.jar": nil,
103
104 "bar-doc/a.java": nil,
105 "bar-doc/b.java": nil,
106 "bar-doc/IFoo.aidl": nil,
107 "bar-doc/known_oj_tags.txt": nil,
108 "external/doclava/templates-sdk": nil,
109
110 "cert/new_cert.x509.pem": nil,
111 "cert/new_cert.pk8": nil,
112
113 "android/sysprop/PlatformProperties.sysprop": nil,
114 "com/android/VendorProperties.sysprop": nil,
Inseob Kim42882742019-07-30 17:55:33 +0900115 "com/android2/OdmProperties.sysprop": nil,
Andrew Walbrana5deb732024-02-15 13:39:46 +0000116
117 "librustutils/lib.rs": nil,
Inseob Kimc0907f12019-02-08 21:00:45 +0900118 }
119
Paul Duffin89648f92021-03-20 00:36:55 +0000120 result := android.GroupFixturePreparers(
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000121 cc.PrepareForTestWithCcDefaultModules,
122 java.PrepareForTestWithJavaDefaultModules,
Andrew Walbrana5deb732024-02-15 13:39:46 +0000123 rust.PrepareForTestWithRustDefaultModules,
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000124 PrepareForTestWithSyspropBuildComponents,
125 android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
126 variables.DeviceSystemSdkVersions = []string{"28"}
127 variables.DeviceVndkVersion = proptools.StringPtr("current")
Jiyong Parkf58c46e2021-04-01 21:35:20 +0900128 variables.Platform_vndk_version = proptools.StringPtr("29")
Jiyong Park7416d672024-01-04 23:20:42 +0000129 variables.DeviceCurrentApiLevelForVendorModules = proptools.StringPtr("28")
130 }),
131 java.FixtureWithPrebuiltApis(map[string][]string{
132 "28": {},
133 "29": {},
134 "30": {},
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000135 }),
136 mockFS.AddToFixture(),
137 android.FixtureWithRootAndroidBp(bp),
Paul Duffin89648f92021-03-20 00:36:55 +0000138 ).RunTest(t)
Inseob Kimc0907f12019-02-08 21:00:45 +0900139
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000140 return result
Inseob Kimc0907f12019-02-08 21:00:45 +0900141}
142
143func TestSyspropLibrary(t *testing.T) {
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000144 result := test(t, `
Inseob Kimc0907f12019-02-08 21:00:45 +0900145 sysprop_library {
146 name: "sysprop-platform",
Paul Duffin7b3de8f2020-03-30 18:00:25 +0100147 apex_available: ["//apex_available:platform"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900148 srcs: ["android/sysprop/PlatformProperties.sysprop"],
149 api_packages: ["android.sysprop"],
150 property_owner: "Platform",
151 vendor_available: true,
Inseob Kim89db15d2020-02-03 18:06:46 +0900152 host_supported: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900153 }
154
155 sysprop_library {
156 name: "sysprop-platform-on-product",
157 srcs: ["android/sysprop/PlatformProperties.sysprop"],
158 api_packages: ["android.sysprop"],
159 property_owner: "Platform",
160 product_specific: true,
161 }
162
163 sysprop_library {
164 name: "sysprop-vendor",
165 srcs: ["com/android/VendorProperties.sysprop"],
166 api_packages: ["com.android"],
167 property_owner: "Vendor",
Inseob Kimfe612182020-10-20 16:29:55 +0900168 vendor: true,
169 }
170
171 sysprop_library {
172 name: "sysprop-vendor-on-product",
173 srcs: ["com/android/VendorProperties.sysprop"],
174 api_packages: ["com.android"],
175 property_owner: "Vendor",
Inseob Kimc0907f12019-02-08 21:00:45 +0900176 product_specific: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900177 }
178
Inseob Kim42882742019-07-30 17:55:33 +0900179 sysprop_library {
180 name: "sysprop-odm",
181 srcs: ["com/android2/OdmProperties.sysprop"],
182 api_packages: ["com.android2"],
183 property_owner: "Odm",
184 device_specific: true,
185 }
186
Inseob Kimc0907f12019-02-08 21:00:45 +0900187 java_library {
188 name: "java-platform",
189 srcs: ["c.java"],
190 sdk_version: "system_current",
191 libs: ["sysprop-platform"],
192 }
193
194 java_library {
Inseob Kimac1e9862019-12-09 18:15:47 +0900195 name: "java-platform-private",
196 srcs: ["c.java"],
197 platform_apis: true,
198 libs: ["sysprop-platform"],
199 }
200
201 java_library {
Inseob Kimc0907f12019-02-08 21:00:45 +0900202 name: "java-product",
203 srcs: ["c.java"],
204 sdk_version: "system_current",
205 product_specific: true,
Inseob Kimfe612182020-10-20 16:29:55 +0900206 libs: ["sysprop-platform", "sysprop-vendor-on-product"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900207 }
208
209 java_library {
210 name: "java-vendor",
211 srcs: ["c.java"],
212 sdk_version: "system_current",
213 soc_specific: true,
214 libs: ["sysprop-platform", "sysprop-vendor"],
215 }
216
217 cc_library {
218 name: "cc-client-platform",
219 srcs: ["d.cpp"],
Trevor Radcliffed82e8f62022-06-08 16:16:31 +0000220 static_libs: ["libsysprop-platform"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900221 }
222
Jiyong Park5d1598f2019-02-25 22:14:17 +0900223 cc_library_static {
224 name: "cc-client-platform-static",
225 srcs: ["d.cpp"],
Trevor Radcliffed82e8f62022-06-08 16:16:31 +0000226 whole_static_libs: ["libsysprop-platform"],
Jiyong Park5d1598f2019-02-25 22:14:17 +0900227 }
228
Inseob Kimc0907f12019-02-08 21:00:45 +0900229 cc_library {
230 name: "cc-client-product",
231 srcs: ["d.cpp"],
232 product_specific: true,
Trevor Radcliffed82e8f62022-06-08 16:16:31 +0000233 static_libs: ["libsysprop-platform-on-product", "libsysprop-vendor-on-product"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900234 }
235
236 cc_library {
237 name: "cc-client-vendor",
238 srcs: ["d.cpp"],
239 soc_specific: true,
Trevor Radcliffed82e8f62022-06-08 16:16:31 +0000240 static_libs: ["libsysprop-platform", "libsysprop-vendor"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900241 }
Inseob Kim1f959762019-03-27 17:20:37 +0900242
Inseob Kim89db15d2020-02-03 18:06:46 +0900243 cc_binary_host {
244 name: "hostbin",
Trevor Radcliffed82e8f62022-06-08 16:16:31 +0000245 static_libs: ["libsysprop-platform"],
Inseob Kim1f959762019-03-27 17:20:37 +0900246 }
Jiyong Park5e914b22021-03-08 10:09:52 +0900247 `)
Inseob Kimc0907f12019-02-08 21:00:45 +0900248
Inseob Kim42882742019-07-30 17:55:33 +0900249 // Check for generated cc_library
250 for _, variant := range []string{
Jiyong Parkf58c46e2021-04-01 21:35:20 +0900251 "android_vendor.29_arm_armv7-a-neon_shared",
252 "android_vendor.29_arm_armv7-a-neon_static",
253 "android_vendor.29_arm64_armv8-a_shared",
254 "android_vendor.29_arm64_armv8-a_static",
Inseob Kim42882742019-07-30 17:55:33 +0900255 } {
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000256 result.ModuleForTests("libsysprop-platform", variant)
257 result.ModuleForTests("libsysprop-vendor", variant)
258 result.ModuleForTests("libsysprop-odm", variant)
Inseob Kim42882742019-07-30 17:55:33 +0900259 }
260
Justin Yunaf1fde42023-09-27 16:22:10 +0900261 // product variant of vendor-owned sysprop_library
262 for _, variant := range []string{
263 "android_product.29_arm_armv7-a-neon_shared",
264 "android_product.29_arm_armv7-a-neon_static",
265 "android_product.29_arm64_armv8-a_shared",
266 "android_product.29_arm64_armv8-a_static",
267 } {
268 result.ModuleForTests("libsysprop-vendor-on-product", variant)
269 }
270
Inseob Kimc0907f12019-02-08 21:00:45 +0900271 for _, variant := range []string{
Colin Cross7113d202019-11-20 16:39:12 -0800272 "android_arm_armv7-a-neon_shared",
273 "android_arm_armv7-a-neon_static",
274 "android_arm64_armv8-a_shared",
275 "android_arm64_armv8-a_static",
Inseob Kimc0907f12019-02-08 21:00:45 +0900276 } {
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000277 library := result.ModuleForTests("libsysprop-platform", variant).Module().(*cc.Module)
Paul Duffin7b3de8f2020-03-30 18:00:25 +0100278 expectedApexAvailableOnLibrary := []string{"//apex_available:platform"}
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000279 android.AssertDeepEquals(t, "apex available property on libsysprop-platform", expectedApexAvailableOnLibrary, library.ApexProperties.Apex_available)
Inseob Kimc0907f12019-02-08 21:00:45 +0900280 }
281
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000282 result.ModuleForTests("sysprop-platform", "android_common")
283 result.ModuleForTests("sysprop-platform_public", "android_common")
284 result.ModuleForTests("sysprop-vendor", "android_common")
285 result.ModuleForTests("sysprop-vendor-on-product", "android_common")
Inseob Kimc0907f12019-02-08 21:00:45 +0900286
287 // Check for exported includes
Colin Cross7113d202019-11-20 16:39:12 -0800288 coreVariant := "android_arm64_armv8-a_static"
Jiyong Parkf58c46e2021-04-01 21:35:20 +0900289 vendorVariant := "android_vendor.29_arm64_armv8-a_static"
Justin Yunaf1fde42023-09-27 16:22:10 +0900290 productVariant := "android_product.29_arm64_armv8-a_static"
Inseob Kimc0907f12019-02-08 21:00:45 +0900291
Colin Cross7113d202019-11-20 16:39:12 -0800292 platformInternalPath := "libsysprop-platform/android_arm64_armv8-a_static/gen/sysprop/include"
Jiyong Parkf58c46e2021-04-01 21:35:20 +0900293 platformPublicVendorPath := "libsysprop-platform/android_vendor.29_arm64_armv8-a_static/gen/sysprop/public/include"
Inseob Kimc0907f12019-02-08 21:00:45 +0900294
Justin Yunaf1fde42023-09-27 16:22:10 +0900295 platformOnProductPath := "libsysprop-platform-on-product/android_product.29_arm64_armv8-a_static/gen/sysprop/public/include"
Inseob Kimc0907f12019-02-08 21:00:45 +0900296
Jiyong Parkf58c46e2021-04-01 21:35:20 +0900297 vendorInternalPath := "libsysprop-vendor/android_vendor.29_arm64_armv8-a_static/gen/sysprop/include"
Justin Yunaf1fde42023-09-27 16:22:10 +0900298 vendorOnProductPath := "libsysprop-vendor-on-product/android_product.29_arm64_armv8-a_static/gen/sysprop/public/include"
Inseob Kimc0907f12019-02-08 21:00:45 +0900299
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000300 platformClient := result.ModuleForTests("cc-client-platform", coreVariant)
Inseob Kimc0907f12019-02-08 21:00:45 +0900301 platformFlags := platformClient.Rule("cc").Args["cFlags"]
302
Jiyong Park5d1598f2019-02-25 22:14:17 +0900303 // platform should use platform's internal header
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000304 android.AssertStringDoesContain(t, "flags for platform", platformFlags, platformInternalPath)
Inseob Kimc0907f12019-02-08 21:00:45 +0900305
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000306 platformStaticClient := result.ModuleForTests("cc-client-platform-static", coreVariant)
Jiyong Park5d1598f2019-02-25 22:14:17 +0900307 platformStaticFlags := platformStaticClient.Rule("cc").Args["cFlags"]
308
309 // platform-static should use platform's internal header
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000310 android.AssertStringDoesContain(t, "flags for platform-static", platformStaticFlags, platformInternalPath)
Jiyong Park5d1598f2019-02-25 22:14:17 +0900311
Justin Yunaf1fde42023-09-27 16:22:10 +0900312 productClient := result.ModuleForTests("cc-client-product", productVariant)
Inseob Kimc0907f12019-02-08 21:00:45 +0900313 productFlags := productClient.Rule("cc").Args["cFlags"]
314
Inseob Kim5cefbd22019-06-08 20:36:59 +0900315 // Product should use platform's and vendor's public headers
Inseob Kimc0907f12019-02-08 21:00:45 +0900316 if !strings.Contains(productFlags, platformOnProductPath) ||
Justin Yunaf1fde42023-09-27 16:22:10 +0900317 !strings.Contains(productFlags, vendorOnProductPath) {
Inseob Kimc0907f12019-02-08 21:00:45 +0900318 t.Errorf("flags for product must contain %#v and %#v, but was %#v.",
Justin Yunaf1fde42023-09-27 16:22:10 +0900319 platformOnProductPath, vendorOnProductPath, productFlags)
Inseob Kimc0907f12019-02-08 21:00:45 +0900320 }
321
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000322 vendorClient := result.ModuleForTests("cc-client-vendor", vendorVariant)
Inseob Kimc0907f12019-02-08 21:00:45 +0900323 vendorFlags := vendorClient.Rule("cc").Args["cFlags"]
324
Inseob Kim5cefbd22019-06-08 20:36:59 +0900325 // Vendor should use platform's public header and vendor's internal header
326 if !strings.Contains(vendorFlags, platformPublicVendorPath) ||
Inseob Kimc0907f12019-02-08 21:00:45 +0900327 !strings.Contains(vendorFlags, vendorInternalPath) {
328 t.Errorf("flags for vendor must contain %#v and %#v, but was %#v.",
Inseob Kim5cefbd22019-06-08 20:36:59 +0900329 platformPublicVendorPath, vendorInternalPath, vendorFlags)
Inseob Kimc0907f12019-02-08 21:00:45 +0900330 }
Inseob Kimac1e9862019-12-09 18:15:47 +0900331
332 // Java modules linking against system API should use public stub
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000333 javaSystemApiClient := result.ModuleForTests("java-platform", "android_common").Rule("javac")
334 syspropPlatformPublic := result.ModuleForTests("sysprop-platform_public", "android_common").Description("for turbine")
Colin Cross75ce9ec2021-02-26 16:20:32 -0800335 if g, w := javaSystemApiClient.Implicits.Strings(), syspropPlatformPublic.Output.String(); !android.InList(w, g) {
336 t.Errorf("system api client should use public stub %q, got %q", w, g)
Inseob Kimac1e9862019-12-09 18:15:47 +0900337 }
Inseob Kimc0907f12019-02-08 21:00:45 +0900338}
Jiyong Park5e914b22021-03-08 10:09:52 +0900339
340func TestApexAvailabilityIsForwarded(t *testing.T) {
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000341 result := test(t, `
Jiyong Park5e914b22021-03-08 10:09:52 +0900342 sysprop_library {
343 name: "sysprop-platform",
344 apex_available: ["//apex_available:platform"],
345 srcs: ["android/sysprop/PlatformProperties.sysprop"],
346 api_packages: ["android.sysprop"],
347 property_owner: "Platform",
348 }
349 `)
350
351 expected := []string{"//apex_available:platform"}
352
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000353 ccModule := result.ModuleForTests("libsysprop-platform", "android_arm64_armv8-a_shared").Module().(*cc.Module)
Jiyong Park5e914b22021-03-08 10:09:52 +0900354 propFromCc := ccModule.ApexProperties.Apex_available
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000355 android.AssertDeepEquals(t, "apex_available forwarding to cc module", expected, propFromCc)
Jiyong Park5e914b22021-03-08 10:09:52 +0900356
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000357 javaModule := result.ModuleForTests("sysprop-platform", "android_common").Module().(*java.Library)
Jiyong Park5e914b22021-03-08 10:09:52 +0900358 propFromJava := javaModule.ApexProperties.Apex_available
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000359 android.AssertDeepEquals(t, "apex_available forwarding to java module", expected, propFromJava)
Andrew Walbrana5deb732024-02-15 13:39:46 +0000360
361 rustModule := result.ModuleForTests("libsysprop_platform_rust", "android_arm64_armv8-a_rlib_rlib-std").Module().(*rust.Module)
362 propFromRust := rustModule.ApexProperties.Apex_available
363 android.AssertDeepEquals(t, "apex_available forwarding to rust module", expected, propFromRust)
Jiyong Park5e914b22021-03-08 10:09:52 +0900364}
365
366func TestMinSdkVersionIsForwarded(t *testing.T) {
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000367 result := test(t, `
Jiyong Park5e914b22021-03-08 10:09:52 +0900368 sysprop_library {
369 name: "sysprop-platform",
370 srcs: ["android/sysprop/PlatformProperties.sysprop"],
371 api_packages: ["android.sysprop"],
372 property_owner: "Platform",
373 cpp: {
374 min_sdk_version: "29",
375 },
376 java: {
377 min_sdk_version: "30",
378 },
Andrew Walbrana5deb732024-02-15 13:39:46 +0000379 rust: {
380 min_sdk_version: "29",
381 }
Jiyong Park5e914b22021-03-08 10:09:52 +0900382 }
383 `)
384
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000385 ccModule := result.ModuleForTests("libsysprop-platform", "android_arm64_armv8-a_shared").Module().(*cc.Module)
Jiyong Park5e914b22021-03-08 10:09:52 +0900386 propFromCc := proptools.String(ccModule.Properties.Min_sdk_version)
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000387 android.AssertStringEquals(t, "min_sdk_version forwarding to cc module", "29", propFromCc)
Jiyong Park5e914b22021-03-08 10:09:52 +0900388
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000389 javaModule := result.ModuleForTests("sysprop-platform", "android_common").Module().(*java.Library)
Jiyong Parkf1691d22021-03-29 20:11:58 +0900390 propFromJava := javaModule.MinSdkVersionString()
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000391 android.AssertStringEquals(t, "min_sdk_version forwarding to java module", "30", propFromJava)
Andrew Walbrana5deb732024-02-15 13:39:46 +0000392
393 rustModule := result.ModuleForTests("libsysprop_platform_rust", "android_arm64_armv8-a_rlib_rlib-std").Module().(*rust.Module)
394 propFromRust := proptools.String(rustModule.Properties.Min_sdk_version)
395 android.AssertStringEquals(t, "min_sdk_version forwarding to rust module", "29", propFromRust)
Jiyong Park5e914b22021-03-08 10:09:52 +0900396}