Skip to content

Commit 71545b6

Browse files
dgarskeclaude
andcommitted
Improve CI failure logging for fwtpm_check.sh
Add test-suite.log and tests/*.log to artifact upload and print them inline on failure. Append (>>) server log on restart instead of truncating to preserve full server output for both test phases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1f93736 commit 71545b6

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/fwtpm-test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,28 @@ jobs:
210210
WOLFSSL_PATH: ./wolfssl
211211
run: make check
212212

213+
- name: Print test-suite.log on failure
214+
if: ${{ failure() && !matrix.build_only }}
215+
run: |
216+
if [ -f test-suite.log ]; then
217+
echo "=== test-suite.log ==="
218+
cat test-suite.log
219+
fi
220+
for f in tests/*.log; do
221+
[ -f "$f" ] || continue
222+
echo "=== $f ==="
223+
cat "$f"
224+
done
225+
213226
- name: Upload failure logs
214227
if: ${{ failure() && !matrix.build_only }}
215228
uses: actions/upload-artifact@v4
216229
with:
217230
name: fwtpm-logs-${{ matrix.name }}
218231
path: |
219232
/tmp/fwtpm_check_*.log
233+
test-suite.log
234+
tests/*.log
220235
retention-days: 5
221236

222237
# ----------------------------------------------------------------

tests/fwtpm_check.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,11 @@ elif [ -x "$TPM2_TOOLS_SCRIPT" ]; then
429429
sleep 0.3
430430
fi
431431
rm -f "$BUILD_DIR/fwtpm_nv.bin"
432+
echo "--- fwtpm_server restart for tpm2-tools ---" \
433+
>> /tmp/fwtpm_check_$$.log
432434
"$FWTPM_SERVER" --port "$FWTPM_PORT" \
433435
--platform-port "$FWTPM_PLAT_PORT" \
434-
> /tmp/fwtpm_check_$$.log 2>&1 &
436+
>> /tmp/fwtpm_check_$$.log 2>&1 &
435437
echo $! > "$PID_FILE"
436438
if ! wait_for_port "$FWTPM_PORT" 500; then
437439
echo "FAIL: fwtpm_server restart failed before tpm2-tools tests"

0 commit comments

Comments
 (0)