Skip to content

Commit 9191005

Browse files
authored
fix(ci): dump server/container logs when tests fail (#3873)
Output last 100 lines of server.log or docker container logs when integration tests fail to aid debugging.
1 parent 0e96279 commit 9191005

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

scripts/integration-tests.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,21 @@ elif [ $exit_code -eq 5 ]; then
410410
echo "⚠️ No tests collected (pattern matched no tests)"
411411
else
412412
echo "❌ Tests failed"
413+
echo ""
414+
echo "=== Dumping last 100 lines of logs for debugging ==="
415+
416+
# Output server or container logs based on stack config
417+
if [[ "$STACK_CONFIG" == *"server:"* && -f "server.log" ]]; then
418+
echo "--- Last 100 lines of server.log ---"
419+
tail -100 server.log
420+
elif [[ "$STACK_CONFIG" == *"docker:"* ]]; then
421+
docker_log_file="docker-${DISTRO}-${INFERENCE_MODE}.log"
422+
if [[ -f "$docker_log_file" ]]; then
423+
echo "--- Last 100 lines of $docker_log_file ---"
424+
tail -100 "$docker_log_file"
425+
fi
426+
fi
427+
413428
exit 1
414429
fi
415430

0 commit comments

Comments
 (0)