Files
computer-playbook/scripts/tests/environment/00_orchestrator.sh
T
Environment TestandClaude Sonnet 4.6 fb2de0e6b6 fix(test): resolve self-exclusion bug in environment orchestrator
The self-exclusion check compared BASH_SOURCE[0] (relative path when
invoked as `bash ./scripts/…/00_orchestrator.sh`) against the glob-built
step paths (always absolute). The mismatch caused the orchestrator to
include itself in the loop, running a full inner pass of steps 01–10
before the outer loop repeated them — doubling the total runtime.

Fix: resolve SELF to an absolute path using SCRIPT_DIR so the comparison
is always path-equivalent regardless of invocation style.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 20:34:38 +00:00

29 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
# Orchestrates the full local Infinito.Nexus environment test suite.
# Serves as a reference for how to deploy and debug applications locally.
set -euo pipefail
# Force local runtime context.
unset GITHUB_ACTIONS
unset ACT
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Resolve to an absolute path so the self-exclusion works regardless of whether
# the script was invoked with a relative path (e.g. bash ./scripts/…/00_orchestrator.sh).
SELF="${SCRIPT_DIR}/$(basename "${BASH_SOURCE[0]}")"
# shellcheck source=scripts/tests/environment/lib.sh
source "${SCRIPT_DIR}/lib.sh"
# pkgmgr images may reset the working directory before invoking this script.
cd "${REPO_ROOT}"
for step in "${SCRIPT_DIR}"/[0-9][0-9]_*.sh; do
[[ "${step}" == "${SELF}" ]] && continue
load_repo_env
ensure_git_safe_directory
echo "============================================================"
echo ">>> $(basename "${step}")"
echo "============================================================"
bash "${step}"
done