Merge "Parameterize manually benchmark collection in MicrodroidHostTests" into main am: 05f065fc23 am: f66c0f2a3a

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Virtualization/+/3323101

Change-Id: Ia0e6443a0a67ddcdebce7a09813577df5444cc9e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java b/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
index ffcf338..ee2da09 100644
--- a/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
+++ b/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
@@ -1050,9 +1050,28 @@
     }
 
     @Test
-    @Parameters(method = "params")
-    @TestCaseName("{method}_protectedVm_{0}_gki_{1}")
-    public void testMicrodroidRamUsage(boolean protectedVm, String gki) throws Exception {
+    public void testMicrodroidRamUsage_protectedVm_true_gki_null() throws Exception {
+        checkMicrodroidRamUsage(/* protectedVm= */ true, /* gki= */ "null");
+    }
+
+    @Test
+    public void testMicrodroidRamUsage_protectedVm_false_gki_null() throws Exception {
+        checkMicrodroidRamUsage(/* protectedVm= */ false, /* gki= */ "null");
+    }
+
+    @Test
+    public void testMicrodroidRamUsage_protectedVm_true_gki_android15() throws Exception {
+        checkMicrodroidRamUsage(/* protectedVm= */ true, /* gki= */ "android15");
+    }
+
+    @Test
+    public void testMicrodroidRamUsage_protectedVm_false_gki_android15() throws Exception {
+        checkMicrodroidRamUsage(/* protectedVm= */ false, /* gki= */ "android15");
+    }
+
+    // TODO(b/209036125): Upgrade this function to a parameterized test once metrics can be
+    // collected with tradefed parameterizer.
+    void checkMicrodroidRamUsage(boolean protectedVm, String gki) throws Exception {
         // Preconditions
         assumeKernelSupported(gki);
         assumeVmTypeSupported(protectedVm);