Files
computer-playbook/scripts/tests/code.sh
T
kevinveenbirkenbach e642e77597 docker: base infinito image on pkgmgr and reuse entry.sh for local build
- Switch Dockerfile build args to PKGMGR_IMAGE_REPO/TAG
- Copy source to INFINITO_SRC_DIR and install infinito via pkgmgr
- Use entry.sh (INSTALL_LOCAL_BUILD) for build-time local override
- Update build/test scripts to new arg/env names

https://chatgpt.com/share/69455d5d-e13c-800f-8c37-fc0ece49d386
2025-12-19 15:12:41 +01:00

26 lines
788 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
echo "============================================================"
echo ">>> Running UNIT tests in ${INFINITO_DISTRO} container"
echo "============================================================"
docker run --rm \
-e INSTALL_LOCAL_BUILD=1 \
-e PYTHON="${PYTHON}" \
-e TEST_PATTERN="${TEST_PATTERN}" \
-e TEST_TYPE="${TEST_TYPE}" \
-v "$(pwd):/opt/src/infinito" \
"infinito-${INFINITO_DISTRO}" \
bash -lc '
set -euo pipefail
cd /opt/src/infinito
echo "PWD=$(pwd)"
echo "PYTHON=${PYTHON}"
export PATH="$(dirname "$PYTHON"):$PATH"
# Ensure we really use the exported interpreter (and thus the global venv)
make setup
"${PYTHON}" -m unittest discover -s tests/${TEST_TYPE} -t . -p "${TEST_PATTERN}"
'