From: Sage Weil Date: Fri, 23 Aug 2013 05:30:05 +0000 (-0700) Subject: suite: add --dry-run X-Git-Tag: 1.1.0~1925^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8894ff6b9f4b3f0b2d8adb11ca33112a2c09b7ea;p=teuthology.git suite: add --dry-run Signed-off-by: Sage Weil --- diff --git a/teuthology/suite.py b/teuthology/suite.py index 087df2de5..9c704e8eb 100644 --- a/teuthology/suite.py +++ b/teuthology/suite.py @@ -44,6 +44,11 @@ combination, and will override anything in the suite. action='store_true', default=None, help='be more verbose', ) + parser.add_argument( + '--dry-run', + action='store_true', default=None, + help='do a dry run; do not schedule anything', + ) parser.add_argument( '--name', help='name for this suite', @@ -177,9 +182,13 @@ combination, and will override anything in the suite. ]) arg.extend(args.config) arg.extend(path for facet, name, path in configs) - subprocess.check_call( - args=arg, - ) + + if args.dry_run: + log.info('would run: %s' % ' '.join(arg)) + else: + subprocess.check_call( + args=arg, + ) arg = copy.deepcopy(base_arg) arg.append('--last-in-suite') if args.email: