diff --git a/qemu/tests/edk2_basic.py b/qemu/tests/edk2_basic.py index 9db73fdb80..9f9ddfc9b0 100644 --- a/qemu/tests/edk2_basic.py +++ b/qemu/tests/edk2_basic.py @@ -1,3 +1,4 @@ +import re import time from virttest import error_context @@ -33,6 +34,9 @@ def run(test, params, env): test.fail("No highlighted entry was detected " "the boot was abnormal.") error_context.context("Check edk2 output information", test.log.info) + if re.findall("start failed", output[1], re.I | re.M): + test.fail("edk2 failed to start, " + "please check the serial log for details.") if len(output[1].splitlines()) > line_numbers: test.fail("Warning edk2 line count exceeds %d." % line_numbers) time.sleep(2)