Pass the judge a Brief, decide read_seats from its inputs and return a failed bench run as a line
This commit is contained in:
@@ -113,9 +113,17 @@ def run(name):
|
||||
return f"{name}: FAILED after {ATTEMPTS} attempts"
|
||||
|
||||
|
||||
def attempted(name):
|
||||
"""run's result line, or a line naming the failure, so one failed run leaves the others' results to print."""
|
||||
try:
|
||||
return run(name)
|
||||
except (KeyError, ValueError, subprocess.CalledProcessError, OSError) as failure:
|
||||
return f"{name}: FAILED: {type(failure).__name__}: {failure}"
|
||||
|
||||
|
||||
def main():
|
||||
with concurrent.futures.ThreadPoolExecutor(max_workers=4) as pool:
|
||||
for result in pool.map(run, sys.argv[1:]):
|
||||
for result in pool.map(attempted, sys.argv[1:]):
|
||||
print(result, flush=True)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user