aboutsummaryrefslogtreecommitdiffstats
path: root/qtip
diff options
context:
space:
mode:
authorTaseer <taseer94@gmail.com>2017-06-02 15:18:56 +0500
committerTaseer <taseer94@gmail.com>2017-06-02 21:03:33 +0500
commitb82052c8c00ba54f03c0f23a10a18c787946ffc1 (patch)
tree75549fa5e9442210b50708a4f99472077750e01e /qtip
parentaa27f390c9ad6817d2682c4f59594f43c69d614f (diff)
Pass on unhandled options.
- More robust testing Change-Id: Iaef21e9e244e1b5112ea5faa630e04424dc0b264 Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
Diffstat (limited to 'qtip')
-rw-r--r--qtip/runner/project.py25
1 files changed, 19 insertions, 6 deletions
diff --git a/qtip/runner/project.py b/qtip/runner/project.py
index 90d1e079..a0617228 100644
--- a/qtip/runner/project.py
+++ b/qtip/runner/project.py
@@ -15,13 +15,26 @@ def convert(vals):
return " ".join(vals)
-def setup(extra_val=None):
- os.system('ansible-playbook setup.yml {}'.format(convert(extra_val)))
+ARGS = 'ansible-playbook {}.yml {}'
+NO_ARGS = 'ansible-playbook {}.yml'
-def run(extra_val=None):
- os.system('ansible-playbook run.yml {}'.format(convert(extra_val)))
+def setup(extra_val):
+ if extra_val:
+ os.system(ARGS.format('setup', convert(extra_val)))
+ else:
+ os.system(NO_ARGS.format('setup'))
-def teardown(extra_val=None):
- os.system('ansible-playbook teardown.yml {}'.format(convert(extra_val)))
+def run(extra_val):
+ if extra_val:
+ os.system(ARGS.format('run', convert(extra_val)))
+ else:
+ os.system(NO_ARGS.format('run'))
+
+
+def teardown(extra_val):
+ if extra_val:
+ os.system(ARGS.format('teardown', convert(extra_val)))
+ else:
+ os.system(NO_ARGS.format('teardown'))