From 8cb5b6e0ef447098ce32705506a0bef9292c9914 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Fri, 14 Oct 2022 07:32:43 +0200 Subject: [PATCH] coverage.py: add --format option --- coverage.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/coverage.py b/coverage.py index b6cf648..333a573 100755 --- a/coverage.py +++ b/coverage.py @@ -101,6 +101,11 @@ def main(): metavar="variant", help=f"only run tests with this variant (Default = {default_variant})", ) + parser.add_argument( + "--format", + metavar="format", + help=f"only run tests with this format (Default = {default_format})", + ) args = parser.parse_args() # copy over files from git or as distributed @@ -288,6 +293,9 @@ def main(): if args.variant and args.variant != variant: print(f"skipping because of --variant={args.variant}", file=sys.stderr) continue + if args.format and args.format != fmt: + print(f"skipping because of --format={args.format}", file=sys.stderr) + continue proc = subprocess.Popen(argv) try: proc.wait() @@ -320,7 +328,7 @@ def main(): print("failed %d:" % len(failed), file=sys.stderr) for name, dist, mode, variant, fmt in failed: print( - f" {name} --dist={dist} --mode={mode} --variant={variant}", + f" {name} --dist={dist} --mode={mode} --variant={variant} --format={fmt}", file=sys.stderr, ) exit(1)