Skip to content

Commit

Permalink
chore: print ipc output on error
Browse files Browse the repository at this point in the history
  • Loading branch information
Shi-Raida committed Nov 20, 2024
1 parent 959f06c commit faaa99e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ci/ipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ def validate_plan_with_val(pb: Path, dom: Path, plan: Path) -> bool:
blue=True,
)

out_file = f"/tmp/aries-{folder.stem}.log"

try:
domain = folder / "domain.pddl"
problem = folder / "problem.pddl"
Expand All @@ -204,11 +206,7 @@ def validate_plan_with_val(pb: Path, dom: Path, plan: Path) -> bool:
else:
max_depth = 100 # pylint: disable=invalid-name

with open(
f"/tmp/aries-{folder.stem}.log", # nosec: B108
mode="w+",
encoding="utf-8",
) as output:
with open(out_file, mode="w+", encoding="utf-8") as output:
write(f"Output log: {output.name}\n")

with OneshotPlanner(
Expand Down Expand Up @@ -263,6 +261,8 @@ def validate_plan_with_val(pb: Path, dom: Path, plan: Path) -> bool:
except Exception as e: # pylint: disable=broad-except
unsolved.append((folder.stem, "Error"))
write(f"Error: {e}", bold=True, red=True)
write()
write(Path(out_file).read_text(encoding="utf-8"), yellow=True)

finally:
if IS_GITHUB_ACTIONS:
Expand Down

0 comments on commit faaa99e

Please sign in to comment.