Commit a8e0c9f
committed
win_guest_debugging_tool: Optimize and simplify script
The test script for the Windows guest debugging tool was
significantly refactored to improve its structure,
eliminate redundancy, and increase maintainability.
Key logical improvements include:
- The complex three-class inheritance structure was
consolidated into a single, self-contained WinDebugToolTest
class, simplifying the overall architecture.
- A centralized helper method, _run_script_and_get_paths,
was created to handle all PowerShell script executions and
output parsing. This removes significant code duplication
that was present in each test variant.
- Individual test methods were streamlined to focus purely on
their specific validation logic, delegating common tasks like
script execution and session management to helper functions.
- VM session management was made more robust to ensure sessions
are properly created, reused, and cleaned up.
Signed-off-by: Dehan Meng <demeng@redhat.com>1 parent f03b470 commit a8e0c9f
File tree
2 files changed
+636
-901
lines changed- qemu/tests
- cfg
2 files changed
+636
-901
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
32 | | - | |
| 37 | + | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
| |||
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| 75 | + | |
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
| |||
0 commit comments