diff --git a/scripts/bench.py b/scripts/bench.py index de91cb19..8d12af22 100755 --- a/scripts/bench.py +++ b/scripts/bench.py @@ -1010,6 +1010,7 @@ def run_stage(name, runner, bench_ids, stdout_, trace_, output_, **args): elif op == 'finished': # force a failure if args.get('fail'): + proc.kill() raise BenchFailure(last_id, 0, list(last_stdout)) # passed case = m.group('case') @@ -1065,6 +1066,7 @@ def run_stage(name, runner, bench_ids, stdout_, trace_, output_, **args): proged += proged_ erased += erased_ except KeyboardInterrupt: + proc.kill() raise BenchFailure(last_id, 0, list(last_stdout)) finally: children.remove(proc) diff --git a/scripts/test.py b/scripts/test.py index 5a2388c0..7acadb29 100755 --- a/scripts/test.py +++ b/scripts/test.py @@ -1005,6 +1005,7 @@ def run_stage(name, runner, test_ids, stdout_, trace_, output_, **args): elif op == 'finished': # force a failure? if args.get('fail'): + proc.kill() raise TestFailure(last_id, 0, list(last_stdout)) # passed case = m.group('case') @@ -1032,6 +1033,7 @@ def run_stage(name, runner, test_ids, stdout_, trace_, output_, **args): if args.get('keep_going'): proc.kill() except KeyboardInterrupt: + proc.kill() raise TestFailure(last_id, 0, list(last_stdout)) finally: children.remove(proc)