File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,10 +79,14 @@ jobs:
7979 echo "Starting TinyIce in background for 5 seconds to check for startup errors..."
8080 chmod +x "$BINARY_PATH" # Add execute permissions
8181
82- # Run TinyIce with timeout. We want to pass if it exits 0 (graceful stop) or 124 (timeout).
82+ # Run TinyIce, preventing set -e from failing the script immediately if timeout returns 124.
83+ # We want to pass if it exits 0 (graceful stop) or 124 (timeout).
8384 # We fail if it exits with any other non-zero code.
84- timeout 5s sh -c "$BINARY_PATH -port 8080 -config /tmp/tinyice-test-linux-${GOARCH}.json"
85- TIMEOUT_EXIT_CODE=$?
85+ if timeout 5s sh -c "$BINARY_PATH -port 8080 -config /tmp/tinyice-test-linux-${GOARCH}.json"; then
86+ TIMEOUT_EXIT_CODE=0 # timeout succeeded, meaning inner command exited 0
87+ else
88+ TIMEOUT_EXIT_CODE=$? # timeout failed (either non-zero from inner command or 124 for timeout)
89+ fi
8690
8791 if [ $TIMEOUT_EXIT_CODE -eq 0 ]; then
8892 echo "TinyIce exited gracefully within 5 seconds. Test passed."
You can’t perform that action at this time.
0 commit comments