Skip to content

Commit

Permalink
ci: stop failing on the first error
Browse files Browse the repository at this point in the history
  • Loading branch information
Shi-Raida committed Feb 22, 2023
1 parent 8adf63d commit d37aa3d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ci/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@
problem_dir = Path("./planning/ext/up/bins/problems/").resolve()
problem_files = list(map(str, list(problem_dir.iterdir())))

failed = 0
for problem_file in problem_files:
cmd = solver_cmd.format(instance=problem_file).split(" ")
print("Solving instance: " + problem_file)
print("Command: " + " ".join(cmd))
print("Command: " + " ".join(cmd) + "\n")
solver_run = subprocess.run(cmd, stdout=subprocess.PIPE, universal_newlines=True)
if solver_run.returncode != 0:
print("Solver did not return expected result")
exit(1)
failed += 1
if failed != 0:
print(f"===== {failed} errors on {len(problem_files)} problems =====")
exit(failed)

0 comments on commit d37aa3d

Please sign in to comment.