Tests are no longer sensitive to where the logs are from

A Microdroid VM emits logs via two serial ports. The first serial port
is used as the console where kernel logs (and userspace logs sent to
/dev/kmsg) are emitted. The second serial port is used for the logs
emitted via liblog.

There are some tests which expect certain string (ex: boot complete
message) from the VM logs. The problem however was that those tests have
had knowwledge about which of the two serial ports to read. This broke
the tests when we changed where the logs are emitted to.

With this change, the tests are no longer sensitive to where the logs
are from.

Bug: 308383728
Test: run against git_24Q1-release
Merged-In: Ie98acc8e64e157211fe3bfd0b37f66972726887c
Change-Id: Ie98acc8e64e157211fe3bfd0b37f66972726887c
diff --git a/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java b/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
index 6ee8b72..34d06ab 100644
--- a/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
+++ b/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
@@ -433,7 +433,9 @@
                         key, keyOverrides, /*isProtected=*/ false, /*updateBootconfigs=*/ true);
         assertThatEventually(
                 100000,
-                () -> getDevice().pullFileContents(CONSOLE_PATH),
+                () ->
+                        getDevice().pullFileContents(CONSOLE_PATH)
+                                + getDevice().pullFileContents(LOG_PATH),
                 containsString("boot completed, time to run payload"));
 
         vmInfo.mProcess.destroy();
diff --git a/tests/testapk/src/java/com/android/microdroid/test/MicrodroidTests.java b/tests/testapk/src/java/com/android/microdroid/test/MicrodroidTests.java
index 028e54c..ca56859 100644
--- a/tests/testapk/src/java/com/android/microdroid/test/MicrodroidTests.java
+++ b/tests/testapk/src/java/com/android/microdroid/test/MicrodroidTests.java
@@ -1257,7 +1257,7 @@
 
         assertThat(payloadStarted.getNow(false)).isTrue();
         assertThat(exitCodeFuture.getNow(0)).isNotEqualTo(0);
-        assertThat(listener.getConsoleOutput()).contains(reason);
+        assertThat(listener.getConsoleOutput() + listener.getLogOutput()).contains(reason);
     }
 
     @Test
@@ -1615,7 +1615,7 @@
                         .command(
                                 "logcat",
                                 "-e",
-                                "virtualizationmanager::aidl: Console.*executing main task",
+                                "virtualizationmanager::aidl: (Console|Log).*executing main task",
                                 "-t",
                                 time)
                         .start();