diff --git a/coverage.py b/coverage.py index a76fc76..39ba46b 100755 --- a/coverage.py +++ b/coverage.py @@ -207,13 +207,27 @@ def main(): # parse coverage.txt config_order, config_dict = parse_config("coverage.txt") - if set(os.listdir("tests")) - set(config_order): + indirbutnotcovered = set( + [d for d in os.listdir("tests") if not d.startswith(".")] + ) - set(config_order) + if indirbutnotcovered: print( "test(s) missing from coverage.txt: %s" - % (", ".join(sorted(set(os.listdir("tests")) - set(config_order)))), + % (", ".join(sorted(indirbutnotcovered))), file=sys.stderr, ) exit(1) + coveredbutnotindir = set(config_order) - set( + [d for d in os.listdir("tests") if not d.startswith(".")] + ) + if coveredbutnotindir: + print( + "test(s) missing from ./tests: %s" + % (", ".join(sorted(coveredbutnotindir))), + file=sys.stderr, + ) + + exit(1) # produce the list of tests using the cartesian product of all allowed # dists, modes, variants and formats of a given test