Generate wrapper lib.rs with one module per sysprop file.

This required moving to a SourceProvider for the Rust library. With the
previous approach only the first input file was being used.

Bug: 270547306
Test: Built libplatformproperties_rust, looked at output
Change-Id: I1070655abc071e099a42bc4be61cc080902e31c1
This commit is contained in:
Andrew Walbran
2024-03-12 17:27:29 +00:00
parent d3f500da5b
commit acd75d2b50
2 changed files with 60 additions and 36 deletions

View File

@@ -72,6 +72,15 @@ func test(t *testing.T, bp string) *android.TestResult {
vendor_available: true,
min_sdk_version: "29",
}
rust_library {
name: "liblog_rust",
crate_name: "log",
srcs: ["log/src/lib.rs"],
product_available: true,
vendor_available: true,
min_sdk_version: "29",
}
`
mockFS := android.MockFS{
@@ -115,6 +124,7 @@ func test(t *testing.T, bp string) *android.TestResult {
"com/android2/OdmProperties.sysprop": nil,
"librustutils/lib.rs": nil,
"log/src/lib.rs": nil,
}
result := android.GroupFixturePreparers(