test: tighten source install pnpm assertions
Some checks failed
Install Smoke / install-sh-git-smoke (push) Has been cancelled
Install Smoke / install-cli-git-smoke (push) Has been cancelled
Install Smoke / install-scripts-cross-platform (ubuntu-latest) (push) Has been cancelled
Install Smoke / install-scripts-cross-platform (windows-latest) (push) Has been cancelled
Install Smoke / install-scripts-macos (push) Has been cancelled
Install Smoke / shellcheck (push) Has been cancelled
Install Smoke / install-sh-unit (push) Has been cancelled
Install Smoke / install-smoke (push) Has been cancelled
Install Smoke / windows-install-verify (22, windows-2022) (push) Has been cancelled
Install Smoke / windows-install-verify (22, windows-latest) (push) Has been cancelled
Install Smoke / windows-install-verify (24, windows-2022) (push) Has been cancelled
Install Smoke / windows-install-verify (24, windows-latest) (push) Has been cancelled

This commit is contained in:
Peter Steinberger 2026-05-02 02:42:52 +01:00
parent 886c9ac60a
commit 4955f7ffb8
No known key found for this signature in database
2 changed files with 13 additions and 16 deletions

View File

@ -226,8 +226,7 @@ echo "==> case: install_openclaw_from_git uses run_pnpm"
export GIT_UPDATE=0
export SHARP_IGNORE_GLOBAL_LIBVIPS=1
deps_cmd=""
build_cmd=""
run_pnpm_calls=()
ensure_git() { :; }
ensure_pnpm() { set_pnpm_cmd echo pnpm; }
@ -237,17 +236,14 @@ echo "==> case: install_openclaw_from_git uses run_pnpm"
emit_json() { :; }
fail() { echo "FAIL: $*" >&2; exit 1; }
run_pnpm() {
if [[ -z "$deps_cmd" ]]; then
deps_cmd="$1"
else
build_cmd="$1"
fi
run_pnpm_calls+=("$*")
return 0
}
install_openclaw_from_git "${repo}"
assert_eq "$deps_cmd" "-C" "install_openclaw_from_git deps command entry"
assert_nonempty "$build_cmd" "install_openclaw_from_git build command entry"
assert_eq "${run_pnpm_calls[0]}" "-C ${repo} install" "install_openclaw_from_git deps command"
assert_eq "${run_pnpm_calls[1]}" "-C ${repo} ui:build" "install_openclaw_from_git ui build command"
assert_eq "${run_pnpm_calls[2]}" "-C ${repo} build" "install_openclaw_from_git build command"
test -x "${prefix}/bin/openclaw"
)

View File

@ -532,8 +532,7 @@ echo "==> case: install_openclaw_from_git (deps step uses run_pnpm function)"
# shellcheck disable=SC2034
SHARP_IGNORE_GLOBAL_LIBVIPS=1
deps_called=0
deps_cmd=""
run_pnpm_steps=()
check_git() { return 0; }
install_git() { fail "install_git should not be called"; }
@ -550,16 +549,18 @@ echo "==> case: install_openclaw_from_git (deps step uses run_pnpm function)"
run_quiet_step() {
local _title="$1"
shift
if [[ "${_title}" == "Installing dependencies" ]]; then
deps_called=1
deps_cmd="${1:-}"
if [[ "${1:-}" == "run_pnpm" ]]; then
shift
run_pnpm_steps+=("$*")
return 0
fi
"$@" >/dev/null 2>&1 || true
}
install_openclaw_from_git "${repo}"
assert_eq "$deps_called" "1" "install_openclaw_from_git dependencies step"
assert_eq "$deps_cmd" "run_pnpm" "install_openclaw_from_git dependencies command"
assert_eq "${run_pnpm_steps[0]}" "-C ${repo} install" "install_openclaw_from_git dependencies command"
assert_eq "${run_pnpm_steps[1]}" "-C ${repo} ui:build" "install_openclaw_from_git ui build command"
assert_eq "${run_pnpm_steps[2]}" "-C ${repo} build" "install_openclaw_from_git build command"
)
echo "==> case: ensure_pnpm_git_prepare_allowlist (known dep added once)"