fix(test): stream bundled plugin sweep logs

This commit is contained in:
Vincent Koc
2026-05-25 13:37:31 +02:00
parent 2e7e4bc966
commit fc3cd4970c
2 changed files with 9 additions and 5 deletions

View File

@@ -31,16 +31,18 @@ done
echo "Running bundled plugin install/uninstall Docker E2E..."
RUN_LOG="$(mktemp "${TMPDIR:-/tmp}/openclaw-bundled-plugin-install-uninstall.XXXXXX")"
cleanup() {
rm -f "$RUN_LOG"
}
trap cleanup EXIT
if ! docker_e2e_run_with_harness \
"${DOCKER_ENV_ARGS[@]}" \
"$IMAGE_NAME" \
bash scripts/e2e/lib/bundled-plugin-install-uninstall/sweep.sh >"$RUN_LOG" 2>&1
bash scripts/e2e/lib/bundled-plugin-install-uninstall/sweep.sh 2>&1 |
tee "$RUN_LOG"
then
cat "$RUN_LOG"
rm -f "$RUN_LOG"
exit 1
fi
cat "$RUN_LOG"
rm -f "$RUN_LOG"
echo "OK"

View File

@@ -335,6 +335,8 @@ describe("docker build helper", () => {
expect(runner).toContain("OPENCLAW_BUNDLED_PLUGIN_SWEEP_INDEX");
expect(runner).toContain("OPENCLAW_BUNDLED_PLUGIN_RUNTIME_READY_MS");
expect(runner).toContain("scripts/e2e/lib/bundled-plugin-install-uninstall/sweep.sh");
expect(runner).toContain('tee "$RUN_LOG"');
expect(runner).not.toContain('cat "$RUN_LOG"');
expect(probe).toContain('"openclaw.plugin.json"');
expect(runtimeSmoke).toContain("process.env.OPENCLAW_BUNDLED_PLUGIN_RUNTIME_READY_MS");
expect(runtimeSmoke).toContain("900000");