Skip to content

Commit 27009d7

Browse files
committed
add check black screen
Signed-off-by: dw035535 <diane.wang@broadcom.com>
1 parent f250535 commit 27009d7

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

windows/guest_customization/win_gosc_verify.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,12 @@
2727
include_tasks: check_runonce_command.yml
2828
- name: "Check timezone configured"
2929
include_tasks: check_timezone.yml
30+
- name: "Get Windows shell process status"
31+
include_tasks: ../utils/win_check_black_screen.yml
32+
- name: "Check black screen"
33+
ansible.builtin.assert:
34+
that:
35+
- win_explorer_running
36+
fail_msg: >
37+
Failed to get process 'explorer.exe' status in guest OS after GOSC,
38+
black screen issue may happen, please check the screenshot or log files in the current test case log folder.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright 2025 VMware, Inc.
2+
# SPDX-License-Identifier: BSD-2-Clause
3+
---
4+
# Check if there is black screen issue occurs in Windows guest OS
5+
#
6+
- name: "Initialize the status of process 'explorer.exe'"
7+
ansible.builtin.set_fact:
8+
win_explorer_running: false
9+
10+
- name: "Get the status of process 'explorer.exe'"
11+
include_tasks: win_execute_cmd.yml
12+
vars:
13+
win_powershell_cmd: "Get-Process -Name explorer"
14+
win_execute_cmd_ignore_error: true
15+
16+
- name: "Set fact of the status of process 'explorer.exe'"
17+
ansible.builtin.set_fact:
18+
win_explorer_running: true
19+
when:
20+
- win_powershell_cmd_output.rc is defined
21+
- win_powershell_cmd_output.rc == 0

0 commit comments

Comments
 (0)