coverage.py: add --mode to only run tests with given mode

This commit is contained in:
Johannes Schauer Marin Rodrigues 2022-05-29 09:32:02 +02:00
parent d96e85fddd
commit 1b5d87c7cf
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -74,6 +74,7 @@ def main():
default=0, default=0,
help="exit after first num failures or errors.", help="exit after first num failures or errors.",
) )
parser.add_argument("--mode", metavar="mode", help="only run tests with this mode")
args = parser.parse_args() args = parser.parse_args()
# copy over files from git or as distributed # copy over files from git or as distributed
@ -146,6 +147,8 @@ def main():
if only_dists and dist not in only_dists: if only_dists and dist not in only_dists:
continue continue
for mode in modes: for mode in modes:
if args.mode and args.mode != mode:
continue
for variant in variants: for variant in variants:
for fmt in formats: for fmt in formats:
skipreason = skip( skipreason = skip(