Sometime we need to pass the parameters which contains blanks and it
is usually done through surrounding it with quotes. So this patch use
re.findall() to try to recognize the parameter surrounded by quotes
and pass it as one single argument to the control file.

Kvm subtest would first benefit from this patch as we could pass
something like "vms='vm1 vm2'" to it.

Signed-off-by: Jason Wang <[email protected]>
---
 client/bin/job.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/client/bin/job.py b/client/bin/job.py
index 750bf1c..a3c727a 100644
--- a/client/bin/job.py
+++ b/client/bin/job.py
@@ -230,7 +230,9 @@ class base_client_job(base_job.base_job):
 
         self.args = []
         if options.args:
-            self.args = options.args.split()
+            print options.args
+            self.args = re.findall("[^\s]*?['|\"].*?['|\"]|[^\s]+", 
options.args)
+            print self.args
 
         if options.user:
             self.user = options.user

_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to