Skip to content

Commit

Permalink
Merge pull request avocado-framework#3921 from bgartzi/env_process_re…
Browse files Browse the repository at this point in the history
…factoring-notice_migrate_vms

env_process: Refactor procedure that adds migrate_vms to vms
  • Loading branch information
YongxueHong committed Jun 19, 2024
2 parents 03ec998 + 1f84873 commit 3bd517a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions virttest/env_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,12 @@ def preprocess(test, params, env):
if callable(preprocess_vm_off_hook):
preprocess_vm_off_hook(test, params, env) # pylint: disable=E1102

# Add migrate_vms to vms
migrate_vms = params.objects("migrate_vms")
if migrate_vms:
vms = list(set(params.objects("vms") + migrate_vms))
params["vms"] = " ".join(vms)

# Check if code coverage for qemu is enabled and
# if coverage reset is enabled too, reset coverage report
gcov_qemu = params.get("gcov_qemu", "no") == "yes"
Expand Down Expand Up @@ -1102,12 +1108,6 @@ def preprocess(test, params, env):

base_dir = data_dir.get_data_dir()

# Add migrate_vms to vms
migrate_vms = params.objects("migrate_vms")
if migrate_vms:
vms = list(set(params.objects("vms") + migrate_vms))
params["vms"] = " ".join(vms)

# Permit iptables to permit 49152-49216 ports to libvirt for
# migration and if arch is ppc with power8 then switch off smt
# will be taken care in remote machine for migration to succeed
Expand Down

0 comments on commit 3bd517a

Please sign in to comment.