test: stop macOS VM after Discord smoke · openclaw/openclaw@8435cb8
steipete
·
2026-04-23
·
via Recent Commits to openclaw:main
File tree
parallels-discord-roundtrip
| Original file line number | Diff line number | Diff line change |
|---|
@@ -144,6 +144,7 @@ Use this skill for Parallels guest workflows and smoke interpretation. Do not lo
|
144 | 144 | - `--discord-token-env` |
145 | 145 | - `--discord-guild-id` |
146 | 146 | - `--discord-channel-id` |
| 147 | +- After a successful Discord smoke/roundtrip, shut down the guest VM before handoff (`prlctl stop "$VM_NAME"` or the concrete VM name). The macOS smoke harness should do this automatically after successful Discord proof; still stop the VM manually after ad-hoc Discord checks. Do not leave the Discord-configured guest running; it can keep reading/posting in `#maintainer` and spam Discord after the proof is complete. |
147 | 148 | - Keep the Discord token only in a host env var. |
148 | 149 | - Use installed `openclaw message send/read`, not `node openclaw.mjs message ...`. |
149 | 150 | - Set `channels.discord.guilds` as one JSON object, not dotted config paths with snowflakes. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -50,6 +50,7 @@ pnpm test:parallels:macos \
|
50 | 50 | - Avoid `prlctl enter` / expect for long Discord setup scripts; it line-wraps/corrupts long commands. Use `prlctl exec --current-user /bin/sh -lc ...` for the Discord config phase. |
51 | 51 | - Full 3-OS sweeps: the shared build lock is safe in parallel, but snapshot restore is still a Parallels bottleneck. Prefer serialized Windows/Linux restore-heavy reruns if the host is already under load. |
52 | 52 | - Harness cleanup deletes the temporary Discord smoke messages at exit. |
| 53 | +- After a successful Discord roundtrip, shut down the macOS guest before handoff (`prlctl stop "macOS Tahoe"`). The macOS smoke harness should do this automatically after successful Discord proof; still stop the VM manually after ad-hoc Discord checks. Do not leave the Discord-configured VM running; it can keep reading/posting in `#maintainer` and spam Discord after the proof is complete. |
53 | 54 | - Per-phase logs: `/tmp/openclaw-parallels-smoke.*` |
54 | 55 | - Machine summary: pass `--json` |
55 | 56 | - If roundtrip flakes, inspect `fresh.discord-roundtrip.log` and `discord-last-readback.json` in the run dir first. |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -293,6 +293,28 @@ discord_smoke_enabled() {
|
293 | 293 | [[ -n "$DISCORD_TOKEN_VALUE" && -n "$DISCORD_GUILD_ID" && -n "$DISCORD_CHANNEL_ID" ]] |
294 | 294 | } |
295 | 295 | |
| 296 | +successful_discord_smoke() { |
| 297 | + discord_smoke_enabled || return 1 |
| 298 | + [[ "$FRESH_DISCORD_STATUS" == "pass" || "$UPGRADE_DISCORD_STATUS" == "pass" ]] |
| 299 | +} |
| 300 | + |
| 301 | +stop_vm_after_successful_discord_smoke() { |
| 302 | + successful_discord_smoke || return 0 |
| 303 | + |
| 304 | + say "Stop $VM_NAME after successful Discord smoke" |
| 305 | +set +e |
| 306 | +if command -v gtimeout >/dev/null 2>&1; then |
| 307 | + gtimeout --foreground 120s prlctl stop "$VM_NAME" |
| 308 | +else |
| 309 | + prlctl stop "$VM_NAME" |
| 310 | +fi |
| 311 | +local rc=$? |
| 312 | +set -e |
| 313 | +if (( rc != 0 )); then |
| 314 | + warn "failed to stop $VM_NAME after successful Discord smoke (rc=$rc)" |
| 315 | +fi |
| 316 | +} |
| 317 | + |
296 | 318 | fresh_uses_host_tgz() { |
297 | 319 | if [[ -z "$TARGET_PACKAGE_SPEC" ]]; then |
298 | 320 | return 0 |
@@ -2018,6 +2040,8 @@ if [[ "$KEEP_SERVER" -eq 0 && -n "${SERVER_PID:-}" ]]; then
|
2018 | 2040 | SERVER_PID="" |
2019 | 2041 | fi |
2020 | 2042 | |
| 2043 | +stop_vm_after_successful_discord_smoke |
| 2044 | + |
2021 | 2045 | SUMMARY_JSON_PATH="$( |
2022 | 2046 | SUMMARY_VM="$VM_NAME" \ |
2023 | 2047 | SUMMARY_PROVIDER="$PROVIDER" \ |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。