Skip to content

Commit

Permalink
Merge pull request #5088 from dzhengfy/skip_amd
Browse files Browse the repository at this point in the history
virsh_nodeinfo: skip on AMD
  • Loading branch information
Yingshun authored Aug 7, 2023
2 parents e8b8fe4 + 0b9aba2 commit efc5bcc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libvirt/tests/cfg/virsh_cmd/host/virsh_nodeinfo.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
start_vm = no
virsh_node_options = ""
status_error = "no"
variants:
variants test_case:
- no_option:
libvirtd = "on"
- disable_enable_vcpu:
Expand Down
13 changes: 13 additions & 0 deletions libvirt/tests/src/virsh_cmd/host/virsh_nodeinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@
logging = log.getLogger('avocado.' + __name__)


def check_skip_case(params, test):
"""
Check if the case should be run
:param params: dict, test parameters
:param test: test object
"""
test_case = params.get('test_case')
if test_case == 'no_option' and cputils.get_vendor() == 'amd':
test.cancel("The case does not support AMD machine")


def run(test, params, env):
"""
Test the command virsh nodeinfo
Expand Down Expand Up @@ -236,6 +248,7 @@ def _get_nodeinfo():
"but found '%s'" % (int(cpus_nodeinfo_before),
cpus_nodeinfo_after))

check_skip_case(params, test)
# Prepare libvirtd service

libvirtd = params.get("libvirtd", "on")
Expand Down

0 comments on commit efc5bcc

Please sign in to comment.