From f4ef7e42c68d606e3bff2ca9ae029b344d491736 Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Wed, 20 Dec 2023 01:55:03 -0500 Subject: [PATCH] return code updates --- evaluation/src/eval_coq.py | 2 +- evaluation/src/eval_lean.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/evaluation/src/eval_coq.py b/evaluation/src/eval_coq.py index 89365f6b38..7a4981698d 100644 --- a/evaluation/src/eval_coq.py +++ b/evaluation/src/eval_coq.py @@ -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" diff --git a/evaluation/src/eval_lean.py b/evaluation/src/eval_lean.py index f5d75aa1e3..fc2cd29e2b 100644 --- a/evaluation/src/eval_lean.py +++ b/evaluation/src/eval_lean.py @@ -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"