Make packages/modules/Virtualization tests available to the platform
Soong was accidentally allowing a corner case where modules that
were not supposed to be available to the platform (due to
apex_available being set to an apex and not including
"//apex_available:platform") were being made available to the
platform as long as no apex modules depended on them. Move the
apex_available: ["com.android.virt"] from the defaults modules
to the rust_library modules so that it doesn't apply to the
rust_test modules.
Bug: 394664568
Test: compare out/soong/installs-${TARGET_PRODUCT}.mk
Change-Id: Idff0deb6063ad0bc4ce4a95c43f6fb4d19e57260
diff --git a/android/virtmgr/fsfdt/Android.bp b/android/virtmgr/fsfdt/Android.bp
index 1d03522..64a253d 100644
--- a/android/virtmgr/fsfdt/Android.bp
+++ b/android/virtmgr/fsfdt/Android.bp
@@ -28,12 +28,12 @@
"liblibfdt",
"libanyhow",
],
- apex_available: ["com.android.virt"],
}
rust_library_rlib {
name: "libfsfdt",
defaults: ["libfsfdt_default"],
+ apex_available: ["com.android.virt"],
}
rust_test {
diff --git a/android/virtualizationservice/Android.bp b/android/virtualizationservice/Android.bp
index fb6e39a..6f76510 100644
--- a/android/virtualizationservice/Android.bp
+++ b/android/virtualizationservice/Android.bp
@@ -55,12 +55,12 @@
"libservice_vm_comm",
"libservice_vm_manager",
],
- apex_available: ["com.android.virt"],
}
rust_binary {
name: "virtualizationservice",
defaults: ["virtualizationservice_defaults"],
+ apex_available: ["com.android.virt"],
}
xsd_config {