Files
computer-playbook/scripts/tests/code/run.sh
T
kevinveenbirkenbachandClaude Opus 4.8 b12842610c fix(test-deploy): surface python-resolution errors in roundtrip + run.sh
Drop the `2>/dev/null || true` that swallowed the roundtrip skip-check (a failed
get_role_skip silently became "no skip"), and replace `${PYTHON:-python3}` with
strict `${PYTHON}` in roundtrip.sh and run.sh. Both source
scripts/meta/env/load.sh (which sources python.sh, always setting PYTHON or
failing) before the usage, so the fallback was dead code that only masked a
PYTHON-unset setup error as a confusing system-python failure. Now such a
failure aborts loudly under set -euo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 21:55:39 +02:00

26 lines
916 B
Bash
Executable File

#!/usr/bin/env bash
# Runs the actual unittest discover invocation for the test suite picked
# by INFINITO_TEST_TYPE / INFINITO_TEST_PATTERN. Invoked either directly on the host or
# inside the infinito compose container by scripts/tests/code/wrapper.sh
# -- the body is identical for both runners.
set -euo pipefail
_run_sh_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/meta/env/load.sh
source "${_run_sh_dir}/../../meta/env/load.sh"
unset _run_sh_dir
: "${INFINITO_TEST_PATTERN:?INFINITO_TEST_PATTERN must be set}"
: "${INFINITO_TEST_TYPE:?INFINITO_TEST_TYPE must be set}" # nocheck: makefile-supplied
echo "PWD=$(pwd)"
echo "PYTHON=${PYTHON:-<unset>}"
if [ -n "${PYTHON:-}" ]; then
PATH="$(dirname "$PYTHON"):$PATH"
export PATH
fi
make setup
"${PYTHON}" -m unittest discover -s "tests/${INFINITO_TEST_TYPE}" -t . -p "${INFINITO_TEST_PATTERN}" # nocheck: makefile-supplied