From fc3cd4970c63108ee02567460d6c27c2cdc191f8 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Mon, 25 May 2026 13:37:31 +0200 Subject: [PATCH] fix(test): stream bundled plugin sweep logs --- .../e2e/bundled-plugin-install-uninstall-docker.sh | 12 +++++++----- test/scripts/docker-build-helper.test.ts | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/e2e/bundled-plugin-install-uninstall-docker.sh b/scripts/e2e/bundled-plugin-install-uninstall-docker.sh index b25364edeb0..be7f71ae1bb 100755 --- a/scripts/e2e/bundled-plugin-install-uninstall-docker.sh +++ b/scripts/e2e/bundled-plugin-install-uninstall-docker.sh @@ -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" diff --git a/test/scripts/docker-build-helper.test.ts b/test/scripts/docker-build-helper.test.ts index 1d1732f3109..c7af9cdfd19 100644 --- a/test/scripts/docker-build-helper.test.ts +++ b/test/scripts/docker-build-helper.test.ts @@ -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");