]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
suite: add --dry-run
authorSage Weil <sage@inktank.com>
Fri, 23 Aug 2013 05:30:05 +0000 (22:30 -0700)
committerSage Weil <sage@inktank.com>
Wed, 28 Aug 2013 18:40:41 +0000 (11:40 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
teuthology/suite.py

index 087df2de595a4f583fa5c94360fc7772a62e33e0..9c704e8ebc442d2b71a514c8065626b44fa40ff2 100644 (file)
@@ -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: