diff mbox

KVM test: Pass the test parameters through the command line

Message ID 1295005359-4840-1-git-send-email-lmr@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Meneghel Rodrigues Jan. 14, 2011, 11:42 a.m. UTC
None
diff mbox

Patch

diff --git a/client/tests/kvm/control b/client/tests/kvm/control
index 63bbe5d..79c0897 100644
--- a/client/tests/kvm/control
+++ b/client/tests/kvm/control
@@ -53,6 +53,20 @@  str = """
 """
 tests_cfg = kvm_config.config()
 tests_cfg_path = os.path.join(kvm_test_dir, "tests.cfg")
+
+if args:
+    # We get test parameters from command line
+    for arg in args:
+        try:
+            (key, value) = re.findall("(.*)=(.*)", arg)[0]
+            if key == "only":
+                str += "only %s\n" % value
+            if key == "no":
+                str += "no %s\n" % value
+            else:
+                str += "%s = %s\n" % (key, value)
+        except IndexError:
+            pass
 tests_cfg.fork_and_parse(tests_cfg_path, str)
 
 # Run the tests