Revert "Integrate Rust-specific System Properties into rules generation."

This reverts commit 65374edd0e.

Reason for revert: b/323833345

Change-Id: Ia722b68923617b4abfe3fd96b54b3fe108e9de74
This commit is contained in:
Rico Wind
2024-02-05 14:02:56 +00:00
committed by Gerrit Code Review
parent 65374edd0e
commit be3ea4f149
4 changed files with 12 additions and 151 deletions

View File

@@ -22,7 +22,6 @@ import (
"android/soong/android"
"android/soong/cc"
"android/soong/java"
"android/soong/rust"
"github.com/google/blueprint/proptools"
)
@@ -46,6 +45,18 @@ func test(t *testing.T, bp string) *android.TestResult {
recovery_available: true,
}
cc_library {
name: "liblog",
no_libcrt: true,
nocrt: true,
system_shared_libs: [],
recovery_available: true,
host_supported: true,
llndk: {
symbol_file: "liblog.map.txt",
}
}
java_library {
name: "sysprop-library-stub-platform",
sdk_version: "core_current",
@@ -62,15 +73,6 @@ func test(t *testing.T, bp string) *android.TestResult {
product_specific: true,
sdk_version: "core_current",
}
rust_library {
name: "librustutils",
crate_name: "rustutils",
srcs: ["librustutils/lib.rs"],
product_available: true,
vendor_available: true,
min_sdk_version: "29",
}
`
mockFS := android.MockFS{
@@ -112,14 +114,11 @@ func test(t *testing.T, bp string) *android.TestResult {
"android/sysprop/PlatformProperties.sysprop": nil,
"com/android/VendorProperties.sysprop": nil,
"com/android2/OdmProperties.sysprop": nil,
"librustutils/lib.rs": nil,
}
result := android.GroupFixturePreparers(
cc.PrepareForTestWithCcDefaultModules,
java.PrepareForTestWithJavaDefaultModules,
rust.PrepareForTestWithRustDefaultModules,
PrepareForTestWithSyspropBuildComponents,
android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
variables.DeviceSystemSdkVersions = []string{"28"}
@@ -343,10 +342,6 @@ func TestApexAvailabilityIsForwarded(t *testing.T) {
javaModule := result.ModuleForTests("sysprop-platform", "android_common").Module().(*java.Library)
propFromJava := javaModule.ApexProperties.Apex_available
android.AssertDeepEquals(t, "apex_available forwarding to java module", expected, propFromJava)
rustModule := result.ModuleForTests("libsysprop_platform_rust", "android_arm64_armv8-a_rlib_rlib-std").Module().(*rust.Module)
propFromRust := rustModule.ApexProperties.Apex_available
android.AssertDeepEquals(t, "apex_available forwarding to rust module", expected, propFromRust)
}
func TestMinSdkVersionIsForwarded(t *testing.T) {
@@ -362,9 +357,6 @@ func TestMinSdkVersionIsForwarded(t *testing.T) {
java: {
min_sdk_version: "30",
},
rust: {
min_sdk_version: "29",
}
}
`)
@@ -375,8 +367,4 @@ func TestMinSdkVersionIsForwarded(t *testing.T) {
javaModule := result.ModuleForTests("sysprop-platform", "android_common").Module().(*java.Library)
propFromJava := javaModule.MinSdkVersionString()
android.AssertStringEquals(t, "min_sdk_version forwarding to java module", "30", propFromJava)
rustModule := result.ModuleForTests("libsysprop_platform_rust", "android_arm64_armv8-a_rlib_rlib-std").Module().(*rust.Module)
propFromRust := proptools.String(rustModule.Properties.Min_sdk_version)
android.AssertStringEquals(t, "min_sdk_version forwarding to rust module", "29", propFromRust)
}