test(docker): make e2e temp logs portable

This commit is contained in:
Peter Steinberger
2026-04-23 08:52:48 +01:00
parent e204a31831
commit af03832134
3 changed files with 5 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ prepare_package_tgz() {
prepare_package_tgz
DOCKER_PACKAGE_TGZ="/tmp/openclaw-current.tgz"
run_log="$(mktemp "${TMPDIR:-/tmp}/openclaw-npm-onboard-channel-agent.XXXXXX.log")"
run_log="$(mktemp "${TMPDIR:-/tmp}/openclaw-npm-onboard-channel-agent.XXXXXX")"
echo "Running npm tarball onboard/channel/agent Docker E2E ($CHANNEL)..."
if ! docker run --rm \

View File

@@ -16,7 +16,7 @@ if [[ -n "${OPENAI_BASE_URL:-}" && "${OPENAI_BASE_URL:-}" != "undefined" && "${O
fi
echo "Running plugins Docker E2E..."
RUN_LOG="$(mktemp "${TMPDIR:-/tmp}/openclaw-plugins-run.XXXXXX.log")"
RUN_LOG="$(mktemp "${TMPDIR:-/tmp}/openclaw-plugins-run.XXXXXX")"
if ! docker run --rm "${DOCKER_ENV_ARGS[@]}" -i "$IMAGE_NAME" bash -s >"$RUN_LOG" 2>&1 <<'EOF'
set -euo pipefail

View File

@@ -4,7 +4,9 @@ run_logged() {
local label="$1"
shift
local log_file
log_file="$(mktemp "${TMPDIR:-/tmp}/openclaw-${label}.XXXXXX").log"
local tmp_dir="${TMPDIR:-/tmp}"
tmp_dir="${tmp_dir%/}"
log_file="$(mktemp "$tmp_dir/openclaw-${label}.XXXXXX")"
if ! "$@" >"$log_file" 2>&1; then
cat "$log_file"
rm -f "$log_file"