This patch make the cimtest to execute a special combination of
test groups, for eg:
CIM_NS=root/virt CIM_USER=root CIM_PASS=1 ./runtests libvirt-cim -i localhost -c -d -v KVM
-g "ComputerSystemIndication,ElementConforms"
It is important to use it to check errors under certain condition.
Using ',' is not a perfect solution, but it is the easiest way now.
Signed-off-by: Wenchao Xia <xiawenc(a)linux.vnet.ibm.com>
---
lib/VirtLib/groups.py | 12 ++++++++++++
suites/libvirt-cim/main.py | 6 ++++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/lib/VirtLib/groups.py b/lib/VirtLib/groups.py
index 41d94c8..9e09d62 100644
--- a/lib/VirtLib/groups.py
+++ b/lib/VirtLib/groups.py
@@ -83,6 +83,18 @@ def get_group_test_list(test_suite, group):
return ret
+def get_grouplist_test_list(test_suite, grouplist):
+ """Return a list of dictionaries for a specific group.
+ It will contain the group and test filename
+ """
+ ret = []
+
+ for group in grouplist:
+ temp = get_group_test_list(test_suite, group)
+ ret.extend(temp)
+
+ return ret
+
def list_all_tests(test_suite):
"""Return a list of dictionaries, containing the group and test
filename
"""
diff --git a/suites/libvirt-cim/main.py b/suites/libvirt-cim/main.py
index a4e33e6..725cbc8 100644
--- a/suites/libvirt-cim/main.py
+++ b/suites/libvirt-cim/main.py
@@ -51,7 +51,8 @@ parser.add_option("-m", "--target_url",
dest="t_url", default="localhost:5988",
parser.add_option("-p", "--port", dest="port",
type="int", default=5988,
help="CIMOM port (default: 5988)")
parser.add_option("-g", "--group", dest="group",
- help="Specific test group (default: None)")
+ help='''Specific test group (default: None), multi
+ test group could be spcified as -t "groupa,groupb"
''')
parser.add_option("-t", "--test", dest="test",
help="Specific test case (default: None). \
Must specify --group or -g to use this option")
@@ -225,7 +226,8 @@ def main(options, args):
test_list = groups.get_one_test(TEST_SUITE, options.group,
options.test)
else:
- test_list = groups.get_group_test_list(TEST_SUITE, options.group)
+ #test_list = groups.get_group_test_list(TEST_SUITE, options.group)
+ test_list = groups.get_grouplist_test_list(TEST_SUITE,
options.group.split(','))
if not test_list:
print "Test %s:%s not found" % (options.group, options.test)
--
1.7.1
Show replies by date