Skip to content

Commit

Permalink
tests: break depdencies on cleanup only for test test vms
Browse files Browse the repository at this point in the history
Avoid unnecessary property changes which may have side effects slowing
down the cleanup. So, break a dependency only if a given property is set
to a VM that is going to be removed.
  • Loading branch information
marmarek committed May 9, 2024
1 parent ccb586c commit 2acf8e7
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions qubes/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,11 +1009,16 @@ def remove_vms(self, vms):
pass
# break dependencies
for vm in vms:
vm.default_dispvm = None
vm.netvm = None
vm.management_dispvm = None
vm.guivm = None
vm.audiovm = None
if vm.default_dispvm in vms:
vm.default_dispvm = None
if vm.netvm in vms:
vm.netvm = None
if vm.management_dispvm in vms:
vm.management_dispvm = None
if vm.guivm in vms:
vm.guivm = None
if vm.audiovm in vms:
vm.audiovm = None
# take app instance from any VM to be removed
app = vms[0].app
if app.default_dispvm in vms:
Expand Down

0 comments on commit 2acf8e7

Please sign in to comment.