Commit d859887b authored by Tom Niget's avatar Tom Niget

Invert silent flag

parent eebee103
......@@ -31,7 +31,7 @@ parser = argparse.ArgumentParser()
parser.add_argument("-c", "--compile", action="store_true")
parser.add_argument("-g", "--generate", action="store_true")
parser.add_argument("-o", "--only", nargs="+")
parser.add_argument("-s", "--silent", action="store_true")
parser.add_argument("-v", "--verbose", action="store_true")
parser.add_argument("-w", "--workers", type=int, default=None)
args = parser.parse_args()
......@@ -110,7 +110,10 @@ signal.signal(signal.SIGINT, sigint_handler)
def run_tests():
tests = sorted(Path('tests').glob('*.py'))
if args.silent:
if args.verbose:
for path in tests:
run_test(path, False)
else:
pool = concurrent.futures.ProcessPoolExecutor(args.workers)
print("Running", len(tests), "tests as", pool._max_workers, "workers")
start = datetime.now()
......@@ -121,9 +124,6 @@ def run_tests():
print(f"[{status.ascii()}] ({duration.total_seconds():2.2f}s) {path.name}")
duration = datetime.now() - start
print("Done in", duration.total_seconds(), "seconds")
else:
for path in tests:
run_test(path, False)
if __name__ == "__main__":
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment