提交 3613c887 编写于 作者: L Lucas Meneghel Rodrigues

run: Improve reporting on setup error

In case '7za' is missing, we better report to the user
straight away, rather than just failing silently.
Also, we want to avoid as much as possible config
files not in their right places.

In order to accomplish that goal, check for 7za's
presence in the system on virt_test_assistant, and
throw an exception if it's not present. Also,
make sure we catch exceptions when calling
virt_test_assistant, to present error information
in a good way.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 0df8b96a
......@@ -4,7 +4,7 @@ Program to help setup kvm test environment
@copyright: Red Hat 2010
"""
import os, sys
import os, sys, logging
try:
import autotest.common as common
except ImportError:
......@@ -20,6 +20,9 @@ check_modules = ["kvm", "kvm-%s" % utils_misc.get_cpu_vendor(verbose=False)]
online_docs_url = "https://github.com/autotest/autotest/wiki/KVMAutotest-GetStartedClient"
if __name__ == "__main__":
utils_misc.virt_test_assistant(test_name, test_dir, base_dir,
default_userspace_paths, check_modules,
online_docs_url)
try:
utils_misc.virt_test_assistant(test_name, test_dir, base_dir,
default_userspace_paths, check_modules,
online_docs_url)
except Exception, details:
logging.error("Setup error: %s", details)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册