OvmfPkg/PlatformCI: Verify serial console and PS/2 keyboard in boot test

Currently, FlashRomImage() in PlatformBuildLib.py boots OVMF in QEMU
with -debugcon stdio and a startup.nsh script, but only checks the QEMU
process exit code. The UEFI Shell still executes startup.nsh and shuts
down cleanly even when ConIn and ConOut fail to connect on the ISA/LPC
bridge. Because -serial output is neither captured nor inspected,
regressions in ISA serial (PNP0501) or PS/2 keyboard (PNP0303) console
initialization go undetected in CI.

When MAKE_STARTUP_NSH=TRUE:
1. Redirect QEMU serial output to <BUILD_OUTPUT_BASE>/serial.log via
   -serial file:<path>.
2. Run "dh -d -v -p SimpleTextIn" in startup.nsh before "reset -s".
3. After QEMU exits, verify that serial.log contains "Serial(0x0)"
   (the UefiDevicePathLib text representation of EISA_PNP_ID(0x0501)),
   "Acpi(PNP0303,0x0)", and "BOOT SUCCESS !!!".

Signed-off-by: Kevin Loughlin <kevinloughlin@google.com>
1 file changed