mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:50:44 +00:00
test: harden Docker release smoke probes
This commit is contained in:
@@ -31,6 +31,34 @@ run_logged_print() {
|
||||
rm -f "$log_file"
|
||||
}
|
||||
|
||||
run_logged_print_heartbeat() {
|
||||
local label="$1"
|
||||
local interval_seconds="$2"
|
||||
shift 2
|
||||
local log_file
|
||||
log_file="$(docker_e2e_run_log "$label")"
|
||||
"$@" >"$log_file" 2>&1 &
|
||||
local command_pid=$!
|
||||
local started_at
|
||||
started_at="$(date +%s)"
|
||||
local status=0
|
||||
while kill -0 "$command_pid" 2>/dev/null; do
|
||||
sleep "$interval_seconds"
|
||||
if kill -0 "$command_pid" 2>/dev/null; then
|
||||
local now
|
||||
now="$(date +%s)"
|
||||
echo "still running $label ($((now - started_at))s elapsed)"
|
||||
fi
|
||||
done
|
||||
set +e
|
||||
wait "$command_pid"
|
||||
status=$?
|
||||
set -e
|
||||
docker_e2e_print_log "$log_file"
|
||||
rm -f "$log_file"
|
||||
return "$status"
|
||||
}
|
||||
|
||||
docker_e2e_run_log() {
|
||||
local label="$1"
|
||||
local tmp_dir="${TMPDIR:-/tmp}"
|
||||
|
||||
Reference in New Issue
Block a user