Skip to content

Commit 5a3f56b

Browse files
committed
ci: Show output from failed tests
This allows better triage of test failures.
1 parent 36b7b11 commit 5a3f56b

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ jobs:
6060
STG_PROFILE: ${{ matrix.profile }}
6161
run: |
6262
timeout 900s make -C t prove
63+
- name: Show Failures
64+
if: ${{ failure() }}
65+
run: |
66+
make -C t show-failure-results
6367
6468
unit-tests:
6569
name: Unit Tests

t/Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@ clean-except-prove-cache:
6060
clean: clean-except-prove-cache
6161
$(RM) .prove
6262

63+
show-failure-results:
64+
for t in '$(TEST_RESULTS_DIRECTORY_SQ)'/*.exit; do \
65+
if [ "$$(cat $$t)" != "0" ]; then \
66+
cat "$$(echo $$t | sed -e 's/exit$$/out/g')"; \
67+
fi \
68+
done
69+
6370
test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax \
6471
test-lint-filenames
6572

@@ -93,4 +100,4 @@ aggregate-results:
93100
echo "$$f"; \
94101
done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh
95102

96-
.PHONY: pre-clean $(T) aggregate-results clean
103+
.PHONY: pre-clean $(T) aggregate-results clean show-failure-results

0 commit comments

Comments
 (0)