Parameterize manually benchmark collection in MicrodroidHostTests
This cl implements manual parameterization for the benchmark
collection test in MicrodroidHostTests as a temporary workaround.
This is necessary because the TradeFed parameterizer currently
doesn't support metrics collection, and a permanent solution is
not expected to be in place soon - b/209036125.
Bug: 370885079
Test: atest MicrodroidHostTests
Change-Id: I419abf7bdaf627ec763ac39769e387e93ec003f6
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);