Skip to content

Commit 7bd1b64

Browse files
debug: annotate test failures for log-free debugging
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
1 parent 0d49ef0 commit 7bd1b64

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎.github/workflows/test.yml‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,16 @@ jobs:
4747
run: python diag_test.py
4848

4949
- name: Run test suite
50-
run: python -m unittest test.py test_poc_vulnerability.py -v
50+
run: |
51+
set +e
52+
python -m unittest test.py test_poc_vulnerability.py -v 2>&1 | tee /tmp/suite.log
53+
status=${PIPESTATUS[0]}
54+
if [ "$status" -ne 0 ]; then
55+
# Surface failures as annotations so they are readable even when
56+
# runner logs are unavailable.
57+
grep -E "^(FAIL|ERROR):" /tmp/suite.log | while IFS= read -r line; do
58+
echo "::error title=Test failure::$line"
59+
done
60+
grep -E -A 25 "^(FAIL|ERROR):" /tmp/suite.log | head -150
61+
fi
62+
exit "$status"

0 commit comments

Comments
 (0)