From 70c304e8cdff6736b27f456e491eb1fb1f638736 Mon Sep 17 00:00:00 2001 From: "Qi (Keira) Zhang" Date: Mon, 1 Apr 2024 14:23:56 +0800 Subject: [PATCH] Limit screenshot text extraction only at deploy_vm failure (#566) Signed-off-by: Qi Zhang --- common/test_rescue.yml | 1 + linux/deploy_vm/deploy_vm.yml | 1 + linux/secureboot_enable_disable/secureboot_enable_disable.yml | 2 ++ windows/deploy_vm/deploy_vm.yml | 1 + windows/guest_os_inplace_upgrade/guest_os_inplace_upgrade.yml | 1 + 5 files changed, 6 insertions(+) diff --git a/common/test_rescue.yml b/common/test_rescue.yml index b483b32bb..b6b6866fa 100644 --- a/common/test_rescue.yml +++ b/common/test_rescue.yml @@ -48,6 +48,7 @@ - name: "Extract text from VM screenshot at failed test case {{ current_testcase_name }}" when: + - extract_screenshot_text | default(false) - tesseract_is_installed - vm_screenshot_local_path block: diff --git a/linux/deploy_vm/deploy_vm.yml b/linux/deploy_vm/deploy_vm.yml index 2931dc725..4eb935b58 100644 --- a/linux/deploy_vm/deploy_vm.yml +++ b/linux/deploy_vm/deploy_vm.yml @@ -91,6 +91,7 @@ - name: "Test case failure" include_tasks: ../../common/test_rescue.yml vars: + extract_screenshot_text: true exit_testing_when_fail: true always: - name: "Collect VM deployment logs" diff --git a/linux/secureboot_enable_disable/secureboot_enable_disable.yml b/linux/secureboot_enable_disable/secureboot_enable_disable.yml index 0f30e45ce..c44759454 100644 --- a/linux/secureboot_enable_disable/secureboot_enable_disable.yml +++ b/linux/secureboot_enable_disable/secureboot_enable_disable.yml @@ -147,3 +147,5 @@ - name: "Test case failure" include_tasks: ../../common/test_rescue.yml + vars: + extract_screenshot_text: true diff --git a/windows/deploy_vm/deploy_vm.yml b/windows/deploy_vm/deploy_vm.yml index caca6dddf..836ec2dc1 100644 --- a/windows/deploy_vm/deploy_vm.yml +++ b/windows/deploy_vm/deploy_vm.yml @@ -59,6 +59,7 @@ - name: "Test case failure" include_tasks: ../../common/test_rescue.yml vars: + extract_screenshot_text: true exit_testing_when_fail: true always: - name: "Remove NFS mount point" diff --git a/windows/guest_os_inplace_upgrade/guest_os_inplace_upgrade.yml b/windows/guest_os_inplace_upgrade/guest_os_inplace_upgrade.yml index 4ecf459f8..5ebdfadf4 100644 --- a/windows/guest_os_inplace_upgrade/guest_os_inplace_upgrade.yml +++ b/windows/guest_os_inplace_upgrade/guest_os_inplace_upgrade.yml @@ -75,6 +75,7 @@ - name: "Execute tasks when test failed" include_tasks: ../../common/test_rescue.yml vars: + extract_screenshot_text: true exit_testing_when_fail: true always: - name: "Get upgrade setuperr.log file"