blob: 7d4e69d87803ac4e9a221a2bea3d95067f106e4e [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 }
Andrew Walbranacd75d22024-03-12 17:27:29 +000075
76 rust_library {
77 name: "liblog_rust",
78 crate_name: "log",
79 srcs: ["log/src/lib.rs"],
80 product_available: true,
81 vendor_available: true,
82 min_sdk_version: "29",
83 }
Jiyong Park5e914b22021-03-08 10:09:52 +090084 `
85
Paul Duffin9cbbbb82021-03-18 00:21:03 +000086 mockFS := android.MockFS{
Inseob Kim42882742019-07-30 17:55:33 +090087 "a.java": nil,
88 "b.java": nil,
89 "c.java": nil,
90 "d.cpp": nil,
91 "api/sysprop-platform-current.txt": nil,
92 "api/sysprop-platform-latest.txt": nil,
93 "api/sysprop-platform-on-product-current.txt": nil,
94 "api/sysprop-platform-on-product-latest.txt": nil,
95 "api/sysprop-vendor-current.txt": nil,
96 "api/sysprop-vendor-latest.txt": nil,
Inseob Kimfe612182020-10-20 16:29:55 +090097 "api/sysprop-vendor-on-product-current.txt": nil,
98 "api/sysprop-vendor-on-product-latest.txt": nil,
Inseob Kim42882742019-07-30 17:55:33 +090099 "api/sysprop-odm-current.txt": nil,
100 "api/sysprop-odm-latest.txt": nil,
101 "framework/aidl/a.aidl": nil,
Inseob Kimc0907f12019-02-08 21:00:45 +0900102
103 // For framework-res, which is an implicit dependency for framework
Dan Willemsen412160e2019-04-09 21:36:26 -0700104 "AndroidManifest.xml": nil,
105 "build/make/target/product/security/testkey": nil,
Inseob Kimc0907f12019-02-08 21:00:45 +0900106
107 "build/soong/scripts/jar-wrapper.sh": nil,
108
Inseob Kimc0907f12019-02-08 21:00:45 +0900109 "jdk8/jre/lib/jce.jar": nil,
110 "jdk8/jre/lib/rt.jar": nil,
111 "jdk8/lib/tools.jar": nil,
112
113 "bar-doc/a.java": nil,
114 "bar-doc/b.java": nil,
115 "bar-doc/IFoo.aidl": nil,
116 "bar-doc/known_oj_tags.txt": nil,
117 "external/doclava/templates-sdk": nil,
118
119 "cert/new_cert.x509.pem": nil,
120 "cert/new_cert.pk8": nil,
121
122 "android/sysprop/PlatformProperties.sysprop": nil,
123 "com/android/VendorProperties.sysprop": nil,
Inseob Kim42882742019-07-30 17:55:33 +0900124 "com/android2/OdmProperties.sysprop": nil,
Andrew Walbrana5deb732024-02-15 13:39:46 +0000125
126 "librustutils/lib.rs": nil,
Andrew Walbranacd75d22024-03-12 17:27:29 +0000127 "log/src/lib.rs": nil,
Inseob Kimc0907f12019-02-08 21:00:45 +0900128 }
129
Paul Duffin89648f92021-03-20 00:36:55 +0000130 result := android.GroupFixturePreparers(
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000131 cc.PrepareForTestWithCcDefaultModules,
132 java.PrepareForTestWithJavaDefaultModules,
Andrew Walbrana5deb732024-02-15 13:39:46 +0000133 rust.PrepareForTestWithRustDefaultModules,
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000134 PrepareForTestWithSyspropBuildComponents,
135 android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
136 variables.DeviceSystemSdkVersions = []string{"28"}
Jiyong Park7416d672024-01-04 23:20:42 +0000137 variables.DeviceCurrentApiLevelForVendorModules = proptools.StringPtr("28")
138 }),
139 java.FixtureWithPrebuiltApis(map[string][]string{
140 "28": {},
141 "29": {},
142 "30": {},
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000143 }),
144 mockFS.AddToFixture(),
145 android.FixtureWithRootAndroidBp(bp),
Paul Duffin89648f92021-03-20 00:36:55 +0000146 ).RunTest(t)
Inseob Kimc0907f12019-02-08 21:00:45 +0900147
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000148 return result
Inseob Kimc0907f12019-02-08 21:00:45 +0900149}
150
151func TestSyspropLibrary(t *testing.T) {
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000152 result := test(t, `
Inseob Kimc0907f12019-02-08 21:00:45 +0900153 sysprop_library {
154 name: "sysprop-platform",
Paul Duffin7b3de8f2020-03-30 18:00:25 +0100155 apex_available: ["//apex_available:platform"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900156 srcs: ["android/sysprop/PlatformProperties.sysprop"],
157 api_packages: ["android.sysprop"],
158 property_owner: "Platform",
159 vendor_available: true,
Inseob Kim89db15d2020-02-03 18:06:46 +0900160 host_supported: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900161 }
162
163 sysprop_library {
164 name: "sysprop-platform-on-product",
165 srcs: ["android/sysprop/PlatformProperties.sysprop"],
166 api_packages: ["android.sysprop"],
167 property_owner: "Platform",
168 product_specific: true,
169 }
170
171 sysprop_library {
172 name: "sysprop-vendor",
173 srcs: ["com/android/VendorProperties.sysprop"],
174 api_packages: ["com.android"],
175 property_owner: "Vendor",
Inseob Kimfe612182020-10-20 16:29:55 +0900176 vendor: true,
177 }
178
179 sysprop_library {
180 name: "sysprop-vendor-on-product",
181 srcs: ["com/android/VendorProperties.sysprop"],
182 api_packages: ["com.android"],
183 property_owner: "Vendor",
Inseob Kimc0907f12019-02-08 21:00:45 +0900184 product_specific: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900185 }
186
Inseob Kim42882742019-07-30 17:55:33 +0900187 sysprop_library {
188 name: "sysprop-odm",
189 srcs: ["com/android2/OdmProperties.sysprop"],
190 api_packages: ["com.android2"],
191 property_owner: "Odm",
192 device_specific: true,
193 }
194
Inseob Kimc0907f12019-02-08 21:00:45 +0900195 java_library {
196 name: "java-platform",
197 srcs: ["c.java"],
198 sdk_version: "system_current",
199 libs: ["sysprop-platform"],
200 }
201
202 java_library {
Inseob Kimac1e9862019-12-09 18:15:47 +0900203 name: "java-platform-private",
204 srcs: ["c.java"],
205 platform_apis: true,
206 libs: ["sysprop-platform"],
207 }
208
209 java_library {
Inseob Kimc0907f12019-02-08 21:00:45 +0900210 name: "java-product",
211 srcs: ["c.java"],
212 sdk_version: "system_current",
213 product_specific: true,
Inseob Kimfe612182020-10-20 16:29:55 +0900214 libs: ["sysprop-platform", "sysprop-vendor-on-product"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900215 }
216
217 java_library {
218 name: "java-vendor",
219 srcs: ["c.java"],
220 sdk_version: "system_current",
221 soc_specific: true,
222 libs: ["sysprop-platform", "sysprop-vendor"],
223 }
224
225 cc_library {
226 name: "cc-client-platform",
227 srcs: ["d.cpp"],
Trevor Radcliffed82e8f62022-06-08 16:16:31 +0000228 static_libs: ["libsysprop-platform"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900229 }
230
Jiyong Park5d1598f2019-02-25 22:14:17 +0900231 cc_library_static {
232 name: "cc-client-platform-static",
233 srcs: ["d.cpp"],
Trevor Radcliffed82e8f62022-06-08 16:16:31 +0000234 whole_static_libs: ["libsysprop-platform"],
Jiyong Park5d1598f2019-02-25 22:14:17 +0900235 }
236
Inseob Kimc0907f12019-02-08 21:00:45 +0900237 cc_library {
238 name: "cc-client-product",
239 srcs: ["d.cpp"],
240 product_specific: true,
Trevor Radcliffed82e8f62022-06-08 16:16:31 +0000241 static_libs: ["libsysprop-platform-on-product", "libsysprop-vendor-on-product"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900242 }
243
244 cc_library {
245 name: "cc-client-vendor",
246 srcs: ["d.cpp"],
247 soc_specific: true,
Trevor Radcliffed82e8f62022-06-08 16:16:31 +0000248 static_libs: ["libsysprop-platform", "libsysprop-vendor"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900249 }
Inseob Kim1f959762019-03-27 17:20:37 +0900250
Inseob Kim89db15d2020-02-03 18:06:46 +0900251 cc_binary_host {
252 name: "hostbin",
Trevor Radcliffed82e8f62022-06-08 16:16:31 +0000253 static_libs: ["libsysprop-platform"],
Inseob Kim1f959762019-03-27 17:20:37 +0900254 }
Jiyong Park5e914b22021-03-08 10:09:52 +0900255 `)
Inseob Kimc0907f12019-02-08 21:00:45 +0900256
Inseob Kim42882742019-07-30 17:55:33 +0900257 // Check for generated cc_library
258 for _, variant := range []string{
Kiyoung Kim1db4a742024-04-01 15:50:01 +0900259 "android_vendor_arm_armv7-a-neon_shared",
260 "android_vendor_arm_armv7-a-neon_static",
261 "android_vendor_arm64_armv8-a_shared",
262 "android_vendor_arm64_armv8-a_static",
Inseob Kim42882742019-07-30 17:55:33 +0900263 } {
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000264 result.ModuleForTests("libsysprop-platform", variant)
265 result.ModuleForTests("libsysprop-vendor", variant)
266 result.ModuleForTests("libsysprop-odm", variant)
Inseob Kim42882742019-07-30 17:55:33 +0900267 }
268
Justin Yunaf1fde42023-09-27 16:22:10 +0900269 // product variant of vendor-owned sysprop_library
270 for _, variant := range []string{
Kiyoung Kim1db4a742024-04-01 15:50:01 +0900271 "android_product_arm_armv7-a-neon_shared",
272 "android_product_arm_armv7-a-neon_static",
273 "android_product_arm64_armv8-a_shared",
274 "android_product_arm64_armv8-a_static",
Justin Yunaf1fde42023-09-27 16:22:10 +0900275 } {
276 result.ModuleForTests("libsysprop-vendor-on-product", variant)
277 }
278
Inseob Kimc0907f12019-02-08 21:00:45 +0900279 for _, variant := range []string{
Colin Cross7113d202019-11-20 16:39:12 -0800280 "android_arm_armv7-a-neon_shared",
281 "android_arm_armv7-a-neon_static",
282 "android_arm64_armv8-a_shared",
283 "android_arm64_armv8-a_static",
Inseob Kimc0907f12019-02-08 21:00:45 +0900284 } {
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000285 library := result.ModuleForTests("libsysprop-platform", variant).Module().(*cc.Module)
Paul Duffin7b3de8f2020-03-30 18:00:25 +0100286 expectedApexAvailableOnLibrary := []string{"//apex_available:platform"}
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000287 android.AssertDeepEquals(t, "apex available property on libsysprop-platform", expectedApexAvailableOnLibrary, library.ApexProperties.Apex_available)
Inseob Kimc0907f12019-02-08 21:00:45 +0900288 }
289
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000290 result.ModuleForTests("sysprop-platform", "android_common")
291 result.ModuleForTests("sysprop-platform_public", "android_common")
292 result.ModuleForTests("sysprop-vendor", "android_common")
293 result.ModuleForTests("sysprop-vendor-on-product", "android_common")
Inseob Kimc0907f12019-02-08 21:00:45 +0900294
295 // Check for exported includes
Colin Cross7113d202019-11-20 16:39:12 -0800296 coreVariant := "android_arm64_armv8-a_static"
Kiyoung Kim1db4a742024-04-01 15:50:01 +0900297 vendorVariant := "android_vendor_arm64_armv8-a_static"
298 productVariant := "android_product_arm64_armv8-a_static"
Inseob Kimc0907f12019-02-08 21:00:45 +0900299
Colin Cross7113d202019-11-20 16:39:12 -0800300 platformInternalPath := "libsysprop-platform/android_arm64_armv8-a_static/gen/sysprop/include"
Kiyoung Kim1db4a742024-04-01 15:50:01 +0900301 platformPublicVendorPath := "libsysprop-platform/android_vendor_arm64_armv8-a_static/gen/sysprop/public/include"
Inseob Kimc0907f12019-02-08 21:00:45 +0900302
Kiyoung Kim1db4a742024-04-01 15:50:01 +0900303 platformOnProductPath := "libsysprop-platform-on-product/android_product_arm64_armv8-a_static/gen/sysprop/public/include"
Inseob Kimc0907f12019-02-08 21:00:45 +0900304
Kiyoung Kim1db4a742024-04-01 15:50:01 +0900305 vendorInternalPath := "libsysprop-vendor/android_vendor_arm64_armv8-a_static/gen/sysprop/include"
306 vendorOnProductPath := "libsysprop-vendor-on-product/android_product_arm64_armv8-a_static/gen/sysprop/public/include"
Inseob Kimc0907f12019-02-08 21:00:45 +0900307
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000308 platformClient := result.ModuleForTests("cc-client-platform", coreVariant)
Inseob Kimc0907f12019-02-08 21:00:45 +0900309 platformFlags := platformClient.Rule("cc").Args["cFlags"]
310
Jiyong Park5d1598f2019-02-25 22:14:17 +0900311 // platform should use platform's internal header
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000312 android.AssertStringDoesContain(t, "flags for platform", platformFlags, platformInternalPath)
Inseob Kimc0907f12019-02-08 21:00:45 +0900313
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000314 platformStaticClient := result.ModuleForTests("cc-client-platform-static", coreVariant)
Jiyong Park5d1598f2019-02-25 22:14:17 +0900315 platformStaticFlags := platformStaticClient.Rule("cc").Args["cFlags"]
316
317 // platform-static should use platform's internal header
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000318 android.AssertStringDoesContain(t, "flags for platform-static", platformStaticFlags, platformInternalPath)
Jiyong Park5d1598f2019-02-25 22:14:17 +0900319
Justin Yunaf1fde42023-09-27 16:22:10 +0900320 productClient := result.ModuleForTests("cc-client-product", productVariant)
Inseob Kimc0907f12019-02-08 21:00:45 +0900321 productFlags := productClient.Rule("cc").Args["cFlags"]
322
Inseob Kim5cefbd22019-06-08 20:36:59 +0900323 // Product should use platform's and vendor's public headers
Inseob Kimc0907f12019-02-08 21:00:45 +0900324 if !strings.Contains(productFlags, platformOnProductPath) ||
Justin Yunaf1fde42023-09-27 16:22:10 +0900325 !strings.Contains(productFlags, vendorOnProductPath) {
Inseob Kimc0907f12019-02-08 21:00:45 +0900326 t.Errorf("flags for product must contain %#v and %#v, but was %#v.",
Justin Yunaf1fde42023-09-27 16:22:10 +0900327 platformOnProductPath, vendorOnProductPath, productFlags)
Inseob Kimc0907f12019-02-08 21:00:45 +0900328 }
329
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000330 vendorClient := result.ModuleForTests("cc-client-vendor", vendorVariant)
Inseob Kimc0907f12019-02-08 21:00:45 +0900331 vendorFlags := vendorClient.Rule("cc").Args["cFlags"]
332
Inseob Kim5cefbd22019-06-08 20:36:59 +0900333 // Vendor should use platform's public header and vendor's internal header
334 if !strings.Contains(vendorFlags, platformPublicVendorPath) ||
Inseob Kimc0907f12019-02-08 21:00:45 +0900335 !strings.Contains(vendorFlags, vendorInternalPath) {
336 t.Errorf("flags for vendor must contain %#v and %#v, but was %#v.",
Inseob Kim5cefbd22019-06-08 20:36:59 +0900337 platformPublicVendorPath, vendorInternalPath, vendorFlags)
Inseob Kimc0907f12019-02-08 21:00:45 +0900338 }
Inseob Kimac1e9862019-12-09 18:15:47 +0900339
340 // Java modules linking against system API should use public stub
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000341 javaSystemApiClient := result.ModuleForTests("java-platform", "android_common").Rule("javac")
342 syspropPlatformPublic := result.ModuleForTests("sysprop-platform_public", "android_common").Description("for turbine")
Colin Cross75ce9ec2021-02-26 16:20:32 -0800343 if g, w := javaSystemApiClient.Implicits.Strings(), syspropPlatformPublic.Output.String(); !android.InList(w, g) {
344 t.Errorf("system api client should use public stub %q, got %q", w, g)
Inseob Kimac1e9862019-12-09 18:15:47 +0900345 }
Inseob Kimc0907f12019-02-08 21:00:45 +0900346}
Jiyong Park5e914b22021-03-08 10:09:52 +0900347
348func TestApexAvailabilityIsForwarded(t *testing.T) {
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000349 result := test(t, `
Jiyong Park5e914b22021-03-08 10:09:52 +0900350 sysprop_library {
351 name: "sysprop-platform",
352 apex_available: ["//apex_available:platform"],
353 srcs: ["android/sysprop/PlatformProperties.sysprop"],
354 api_packages: ["android.sysprop"],
355 property_owner: "Platform",
356 }
357 `)
358
359 expected := []string{"//apex_available:platform"}
360
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000361 ccModule := result.ModuleForTests("libsysprop-platform", "android_arm64_armv8-a_shared").Module().(*cc.Module)
Jiyong Park5e914b22021-03-08 10:09:52 +0900362 propFromCc := ccModule.ApexProperties.Apex_available
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000363 android.AssertDeepEquals(t, "apex_available forwarding to cc module", expected, propFromCc)
Jiyong Park5e914b22021-03-08 10:09:52 +0900364
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000365 javaModule := result.ModuleForTests("sysprop-platform", "android_common").Module().(*java.Library)
Jiyong Park5e914b22021-03-08 10:09:52 +0900366 propFromJava := javaModule.ApexProperties.Apex_available
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000367 android.AssertDeepEquals(t, "apex_available forwarding to java module", expected, propFromJava)
Andrew Walbrana5deb732024-02-15 13:39:46 +0000368
369 rustModule := result.ModuleForTests("libsysprop_platform_rust", "android_arm64_armv8-a_rlib_rlib-std").Module().(*rust.Module)
370 propFromRust := rustModule.ApexProperties.Apex_available
371 android.AssertDeepEquals(t, "apex_available forwarding to rust module", expected, propFromRust)
Jiyong Park5e914b22021-03-08 10:09:52 +0900372}
373
374func TestMinSdkVersionIsForwarded(t *testing.T) {
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000375 result := test(t, `
Jiyong Park5e914b22021-03-08 10:09:52 +0900376 sysprop_library {
377 name: "sysprop-platform",
378 srcs: ["android/sysprop/PlatformProperties.sysprop"],
379 api_packages: ["android.sysprop"],
380 property_owner: "Platform",
381 cpp: {
382 min_sdk_version: "29",
383 },
384 java: {
385 min_sdk_version: "30",
386 },
Andrew Walbrana5deb732024-02-15 13:39:46 +0000387 rust: {
388 min_sdk_version: "29",
389 }
Jiyong Park5e914b22021-03-08 10:09:52 +0900390 }
391 `)
392
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000393 ccModule := result.ModuleForTests("libsysprop-platform", "android_arm64_armv8-a_shared").Module().(*cc.Module)
Jiyong Park5e914b22021-03-08 10:09:52 +0900394 propFromCc := proptools.String(ccModule.Properties.Min_sdk_version)
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000395 android.AssertStringEquals(t, "min_sdk_version forwarding to cc module", "29", propFromCc)
Jiyong Park5e914b22021-03-08 10:09:52 +0900396
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000397 javaModule := result.ModuleForTests("sysprop-platform", "android_common").Module().(*java.Library)
Jiyong Parkf1691d22021-03-29 20:11:58 +0900398 propFromJava := javaModule.MinSdkVersionString()
Paul Duffin9cbbbb82021-03-18 00:21:03 +0000399 android.AssertStringEquals(t, "min_sdk_version forwarding to java module", "30", propFromJava)
Andrew Walbrana5deb732024-02-15 13:39:46 +0000400
401 rustModule := result.ModuleForTests("libsysprop_platform_rust", "android_arm64_armv8-a_rlib_rlib-std").Module().(*rust.Module)
402 propFromRust := proptools.String(rustModule.Properties.Min_sdk_version)
403 android.AssertStringEquals(t, "min_sdk_version forwarding to rust module", "29", propFromRust)
Jiyong Park5e914b22021-03-08 10:09:52 +0900404}