Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions 9pm.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,11 +586,12 @@ def agent_prompt(data, aborted):
called = "called without arguments"
lines.append(wrap(f"\"{test['name']}\" at \"{proj_relpath(test['case'])}\" "
f"{called} failed with:"))
lines.append("```")
for failure in test['failures']:
lines.extend(f" {line}" for line in failure)
lines.extend(failure)
if len(failure) >= 40:
lines.append(" (more in the log)")
lines.append("")
lines.append("(more in the log)")
lines += ["```", ""]

lines.append("Please help me investigate this.")
if PROJECT.get('AGENT-HINTS'):
Expand Down
2 changes: 1 addition & 1 deletion self_test/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def test_agent_prompt(self):
for expected in [
'1 test failed running "self_test/suites/abort-suite.yaml" in project 9pm (git ',
'"fail.sh" at "self_test/cases/fail.sh" called with arguments \'opt1\' failed with:',
" not ok 1 - Dummy test fail",
"failed with: ``` not ok 1 - Dummy test fail ```",
"The run was aborted at the first fatal failure.",
"Please help me investigate this.",
]:
Expand Down
Loading