mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 11:46:35 +00:00
121 lines of restated code, step narration, section banners and rationale prose, in workflow YAML, compose overrides, group_vars, lookup and action plugins, role tasks, shell scripts and tests. Three lines go the other way: where a reason has to survive it is now a registered nocheck directive carrying it, not free prose. Two of them point at an invariant further down the same file, the third records why an end-of-life object store keeps no Playwright surface. Scope was decided per line rather than per file. Classifying by "no additions" would have swept roles/web-app-erpnext/tasks along with it, where the removed lines are delegate_to, environment and cmd — a behaviour change that has no business in a comment commit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
41 lines
1.6 KiB
Bash
Executable File
41 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Runs the test suite picked by INFINITO_TEST_TYPE / INFINITO_TEST_PATTERN:
|
|
# parallel via pytest-xdist when pytest and xdist are importable, serial
|
|
# unittest discover otherwise. 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
|
|
bash "$(dirname "${BASH_SOURCE[0]}")/../../install/dev-extras.sh" || echo "dev extras install failed; running serial" >&2
|
|
_suite_dir="tests/${INFINITO_TEST_TYPE}" # nocheck: makefile-supplied
|
|
_junit_report="build/test-reports/${INFINITO_TEST_TYPE}.xml" # nocheck: makefile-supplied
|
|
if "${PYTHON}" -c 'import pytest, xdist' >/dev/null 2>&1; then
|
|
mkdir -p build/test-reports
|
|
PYTHONDONTWRITEBYTECODE=1 "${PYTHON}" -m pytest "${_suite_dir}" -q -n auto --dist loadscope -rP -p no:cacheprovider \
|
|
--import-mode=importlib \
|
|
--junitxml="${_junit_report}" \
|
|
-o consider_namespace_packages=true \
|
|
-o "norecursedirs=.* *.egg dist node_modules venv" \
|
|
-o python_functions= \
|
|
-o "python_files=${INFINITO_TEST_PATTERN}"
|
|
else
|
|
"${PYTHON}" -m unittest discover -s "${_suite_dir}" -t . -p "${INFINITO_TEST_PATTERN}"
|
|
fi
|