From 70e3739fbe310a2412fd66a2c47339327be73c4c Mon Sep 17 00:00:00 2001 From: Xudong Hao Date: Tue, 8 Oct 2024 17:12:28 +0800 Subject: [PATCH] KVM: Enhance feature_test so that get guest log more accurate Signed-off-by: Xudong Hao --- KVM/qemu/tests/feature_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KVM/qemu/tests/feature_test.py b/KVM/qemu/tests/feature_test.py index 4a9e0aff..7cd5735a 100644 --- a/KVM/qemu/tests/feature_test.py +++ b/KVM/qemu/tests/feature_test.py @@ -69,7 +69,7 @@ def get_test_results(test, output, vm, session): :param session: Guest session """ remove_str = "job.log" - guest_log = re.sub(remove_str, "", output.splitlines()[1].split(":")[1].strip()) + guest_log = re.sub(remove_str, "", re.search('.*JOB LOG\s*:\s(.*)', output).group(1)) # Delete the symbolic link to avoid remote copy failure session.cmd("rm %s/test-results/by-status -rf" % guest_log, ignore_all_errors=True)