提交 10f3f1c0 编写于 作者: L Lucas Meneghel Rodrigues 提交者: GitHub

Merge pull request #1036 from sathnaga/run_avocado

Added support to run avocado tests inside guest
from virttest import utils_test
def run(test, params, env):
"""
Run an avocado test inside a guest.
:param test: QEMU test object.
:param params: Dictionary with test parameters.
:param env: Dictionary with the test environment.
"""
vm = env.get_vm(params["main_vm"])
vm.verify_alive()
timeout = int(params.get("test_timeout", 3600))
testlist = []
avocadoinstalltype = params.get("avocadoinstalltype", "pip")
avocadotestrepo = params.get("avocadotestrepo",
"https://github.com/avocado-framework-tests/avocado-misc-tests.git")
avocadotest = params.get("avocadotest", "cpu/ebizzy.py")
avocadomux = params.get("avocadomux", "")
avocadotestargs = params.get("avocadotestargs", "")
for index, item in enumerate(avocadotest.split(',')):
try:
mux = ''
mux = avocadomux.split(',')[index]
except IndexError:
pass
testlist.append((item, mux))
utils_test.run_avocado(vm, params, test, testlist, timeout=timeout,
testrepo=avocadotestrepo,
installtype=avocadoinstalltype, reinstall=False,
add_args=avocadotestargs, ignore_result=False)
- avocado_guest: install setup image_copy unattended_install.cdrom
no JeOS
virt_test_type = qemu libvirt
only Linux
type = avocado_guest
test_timeout = 1800
variants:
- ebizzy:
avocadotest = "cpu/ebizzy.py"
avocadomux = ""
- ebizzy_stress:
avocadotest = "cpu/ebizzy.py,perf/stress.py"
avocadomux = ","
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册