mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 18:20:44 +00:00
perf: speed up Docker aggregate smokes
This commit is contained in:
@@ -35,12 +35,25 @@ docker run --rm \
|
||||
bash -lc "set -euo pipefail
|
||||
entry=dist/index.mjs
|
||||
[ -f \"\$entry\" ] || entry=dist/index.js
|
||||
mock_port=44081
|
||||
export OPENCLAW_DOCKER_OPENAI_BASE_URL=\"http://127.0.0.1:\$mock_port/v1\"
|
||||
MOCK_PORT=\"\$mock_port\" node scripts/e2e/mock-openai-server.mjs >/tmp/mcp-channels-mock-openai.log 2>&1 &
|
||||
mock_pid=\$!
|
||||
for _ in \$(seq 1 80); do
|
||||
if node -e \"fetch('http://127.0.0.1:' + process.argv[1] + '/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\" \"\$mock_port\"; then
|
||||
break
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
node -e \"fetch('http://127.0.0.1:' + process.argv[1] + '/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))\" \"\$mock_port\"
|
||||
node --import tsx scripts/e2e/mcp-channels-seed.ts >/tmp/mcp-channels-seed.log
|
||||
node \"\$entry\" gateway --port $PORT --bind loopback --allow-unconfigured >/tmp/mcp-channels-gateway.log 2>&1 &
|
||||
gateway_pid=\$!
|
||||
cleanup_inner() {
|
||||
kill \"\$gateway_pid\" >/dev/null 2>&1 || true
|
||||
wait \"\$gateway_pid\" >/dev/null 2>&1 || true
|
||||
kill \"\$mock_pid\" >/dev/null 2>&1 || true
|
||||
wait \"\$mock_pid\" >/dev/null 2>&1 || true
|
||||
}
|
||||
dump_gateway_log_on_error() {
|
||||
status=\$?
|
||||
|
||||
Reference in New Issue
Block a user