Fix test.py hang on ctrl-C, cleanup TODOs

A small mistake in test.py's control flow meant the failing test job
would succesfully kill all other test jobs, but then humorously start
up a new process to continue testing.
This commit is contained in:
Christopher Haster
2022-05-14 23:37:19 -05:00
parent 4a42326797
commit 1616115662
7 changed files with 72 additions and 61 deletions

View File

@@ -49,7 +49,6 @@ def testcase(path):
_, case, *_ = path.split('#', 2)
return '%s#%s' % (testsuite(path), case)
# TODO move this out in other files
def openio(path, mode='r'):
if path == '-':
if 'r' in mode:
@@ -728,6 +727,7 @@ def run_stage(name, runner_, **args):
# stop other tests
for child in children.copy():
child.kill()
break
# parallel jobs?
@@ -998,7 +998,6 @@ if __name__ == "__main__":
help="Source file to compile, possibly injecting internal tests.")
comp_parser.add_argument('-o', '--output',
help="Output file.")
# TODO apply this to other scripts?
sys.exit(main(**{k: v
for k, v in vars(parser.parse_args()).items()
if v is not None}))