summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>2015-03-10 13:37:51 (GMT)
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>2015-03-11 12:33:13 (GMT)
commit22416e44dc0ba93fb889543ca1c62dcaff6243a0 (patch)
tree972348d0100116c545cb41cd988e270f305a280a
parente88b1c577ae9a0c6f58a2e49bb6c4093504a8d95 (diff)
downloadlqa-22416e44dc0ba93fb889543ca1c62dcaff6243a0.tar.gz
lqa-22416e44dc0ba93fb889543ca1c62dcaff6243a0.tar.xz
Add new '-n', '--dry-run' option, do everything apart from submitting.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
-rw-r--r--lqa_tool/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lqa_tool/__init__.py b/lqa_tool/__init__.py
index 22d7442..c76d2ee 100644
--- a/lqa_tool/__init__.py
+++ b/lqa_tool/__init__.py
@@ -135,6 +135,8 @@ See 'lqa <command> -h' to read about a specific subcommand.
help="print the json job to stdout")
parser.add_argument('-g', '--profile-file', metavar='PROFILE.yaml',
help="set profile file")
+ parser.add_argument('-n', '--dry-run', action='store_true',
+ help="Dry-run, do everyting apart from submitting")
parser.add_argument('-p', '--profile', nargs='+', type=str,
help="specify the profiles to use")
parser.add_argument('--all-profiles', action='store_true',
@@ -262,7 +264,8 @@ class Lava(object):
if self.args.print_json:
print json.dumps(json_obj, indent=2)
- else:
+
+ if not self.args.dry_run:
try:
job_id = self.server.scheduler.submit_job(
json.dumps(json_obj))