Skip to content

Commit

Permalink
return code updates
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeGinesin committed Dec 20, 2023
1 parent 5d84a9d commit f4ef7e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion evaluation/src/eval_coq.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ def eval_script(path: Path):

elif "Unable to unify" in outmessage:
status = "AssertionError"
returncode = -1
else:
status = "SyntaxError"
returncode = output.returncode

except subprocess.TimeoutExpired as exc:
status = "Timeout"
Expand Down
6 changes: 2 additions & 4 deletions evaluation/src/eval_lean.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ def eval_script(path: Path):
output = subprocess.run(["lean", str(path)], capture_output=True, timeout=5)
outmessage = str(output)

if "error: tactic 'rfl' failed" in outmessage:
if "error: tactic 'rfl' failed" in outmessage: # :skull:
status = "AssertionError"
returncode = -1
elif outmessage == "":
status = "OK"
returncode = 0
else:
status = "SyntaxError"
returncode = -1
returncode = output.returncode

except subprocess.TimeoutExpired as exc:
status = "Timeout"
Expand Down

0 comments on commit f4ef7e4

Please sign in to comment.