mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-22 07:01:44 +03:00
test: quiet docker onboard e2e noise
This commit is contained in:
+1
-1
@@ -77,7 +77,7 @@
|
|||||||
"openclaw:rpc": "node scripts/run-node.mjs agent --mode rpc --json",
|
"openclaw:rpc": "node scripts/run-node.mjs agent --mode rpc --json",
|
||||||
"plugins:sync": "node --import tsx scripts/sync-plugin-versions.ts",
|
"plugins:sync": "node --import tsx scripts/sync-plugin-versions.ts",
|
||||||
"prepack": "pnpm build && pnpm ui:build",
|
"prepack": "pnpm build && pnpm ui:build",
|
||||||
"prepare": "command -v git >/dev/null 2>&1 && git config core.hooksPath git-hooks || exit 0",
|
"prepare": "command -v git >/dev/null 2>&1 && git rev-parse --is-inside-work-tree >/dev/null 2>&1 && git config core.hooksPath git-hooks || exit 0",
|
||||||
"protocol:check": "pnpm protocol:gen && pnpm protocol:gen:swift && git diff --exit-code -- dist/protocol.schema.json apps/macos/Sources/OpenClawProtocol/GatewayModels.swift",
|
"protocol:check": "pnpm protocol:gen && pnpm protocol:gen:swift && git diff --exit-code -- dist/protocol.schema.json apps/macos/Sources/OpenClawProtocol/GatewayModels.swift",
|
||||||
"protocol:gen": "node --import tsx scripts/protocol-gen.ts",
|
"protocol:gen": "node --import tsx scripts/protocol-gen.ts",
|
||||||
"protocol:gen:swift": "node --import tsx scripts/protocol-gen-swift.ts",
|
"protocol:gen:swift": "node --import tsx scripts/protocol-gen-swift.ts",
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ TRASH
|
|||||||
wait_for_log() {
|
wait_for_log() {
|
||||||
local needle="$1"
|
local needle="$1"
|
||||||
local timeout_s="${2:-45}"
|
local timeout_s="${2:-45}"
|
||||||
|
local quiet_on_timeout="${3:-false}"
|
||||||
local needle_compact
|
local needle_compact
|
||||||
needle_compact="$(printf "%s" "$needle" | tr -cd "[:alpha:]")"
|
needle_compact="$(printf "%s" "$needle" | tr -cd "[:alpha:]")"
|
||||||
local start_s
|
local start_s
|
||||||
@@ -91,6 +92,9 @@ TRASH
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ $(( $(date +%s) - start_s )) -ge "$timeout_s" ]; then
|
if [ $(( $(date +%s) - start_s )) -ge "$timeout_s" ]; then
|
||||||
|
if [ "$quiet_on_timeout" = "true" ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
echo "Timeout waiting for log: $needle"
|
echo "Timeout waiting for log: $needle"
|
||||||
if [ -n "${WIZARD_LOG_PATH:-}" ] && [ -f "$WIZARD_LOG_PATH" ]; then
|
if [ -n "${WIZARD_LOG_PATH:-}" ] && [ -f "$WIZARD_LOG_PATH" ]; then
|
||||||
tail -n 140 "$WIZARD_LOG_PATH" || true
|
tail -n 140 "$WIZARD_LOG_PATH" || true
|
||||||
@@ -229,7 +233,7 @@ TRASH
|
|||||||
|
|
||||||
select_skip_hooks() {
|
select_skip_hooks() {
|
||||||
# Hooks multiselect: pick "Skip for now".
|
# Hooks multiselect: pick "Skip for now".
|
||||||
wait_for_log "Enable hooks?" 60 || true
|
wait_for_log "Enable hooks?" 60 true || true
|
||||||
send $'"'"' \r'"'"' 0.6
|
send $'"'"' \r'"'"' 0.6
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,15 +247,15 @@ TRASH
|
|||||||
|
|
||||||
send_reset_config_only() {
|
send_reset_config_only() {
|
||||||
# Risk acknowledgement (default is "No").
|
# Risk acknowledgement (default is "No").
|
||||||
wait_for_log "Continue?" 40 || true
|
wait_for_log "Continue?" 40 true || true
|
||||||
send $'"'"'y\r'"'"' 0.8
|
send $'"'"'y\r'"'"' 0.8
|
||||||
# Select reset flow for existing config.
|
# Select reset flow for existing config.
|
||||||
wait_for_log "Config handling" 40 || true
|
wait_for_log "Config handling" 40 true || true
|
||||||
send $'"'"'\e[B'"'"' 0.3
|
send $'"'"'\e[B'"'"' 0.3
|
||||||
send $'"'"'\e[B'"'"' 0.3
|
send $'"'"'\e[B'"'"' 0.3
|
||||||
send $'"'"'\r'"'"' 0.4
|
send $'"'"'\r'"'"' 0.4
|
||||||
# Reset scope -> Config only (default).
|
# Reset scope -> Config only (default).
|
||||||
wait_for_log "Reset scope" 40 || true
|
wait_for_log "Reset scope" 40 true || true
|
||||||
send $'"'"'\r'"'"' 0.4
|
send $'"'"'\r'"'"' 0.4
|
||||||
select_skip_hooks
|
select_skip_hooks
|
||||||
}
|
}
|
||||||
@@ -273,7 +277,7 @@ TRASH
|
|||||||
# configure --section skills still runs the configure wizard; the first prompt is gateway location.
|
# configure --section skills still runs the configure wizard; the first prompt is gateway location.
|
||||||
# Avoid log-based synchronization here; clack output can fragment ANSI sequences and break matching.
|
# Avoid log-based synchronization here; clack output can fragment ANSI sequences and break matching.
|
||||||
send $'"'"'\r'"'"' 3.0
|
send $'"'"'\r'"'"' 3.0
|
||||||
wait_for_log "Configure skills now?" 120 || true
|
wait_for_log "Configure skills now?" 120 true || true
|
||||||
send $'"'"'n\r'"'"' 0.8
|
send $'"'"'n\r'"'"' 0.8
|
||||||
send "" 2.0
|
send "" 2.0
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user