mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-12-02 07:47:58 +00:00
fix(test): run every unit suite where the python one runs
Only test-unit-python went through the container dispatcher; the javascript, php and ruby targets called their runner directly and so executed against the host, where the toolchain may be absent and the sandbox blocks the install. The dispatcher was never python-specific, it just hardcoded run.sh. It now takes the runner as an argument, and the host-side install prerequisites drop out with it.
This commit is contained in:
1 parent
236233d7c7
commit
86fdaa6f4d
2 files changed
+20
-15
No files matched your search
@@ -1,14 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# Chooses where to execute scripts/tests/code/run.sh based on
|
||||
# INFINITO_TEST_RUNNER:
|
||||
# Chooses where to execute a test runner based on INFINITO_TEST_RUNNER:
|
||||
# docker (default) -- inside the already-running infinito compose
|
||||
# container (requires `make compose-up`).
|
||||
# host -- directly against the host shell/Python.
|
||||
#
|
||||
# Param $1: repo-relative path of the runner script to execute.
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
REPO_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)"
|
||||
RUN_SCRIPT="${SCRIPT_DIR}/run.sh"
|
||||
RUNNER_REL="${1:?usage: wrapper.sh <repo-relative-runner-script>}"
|
||||
RUN_SCRIPT="${REPO_ROOT}/${RUNNER_REL}"
|
||||
|
||||
cd "${REPO_ROOT}"
|
||||
# shellcheck source=scripts/meta/env/load.sh
|
||||
@@ -18,7 +20,7 @@ source scripts/meta/env/load.sh
|
||||
: "${INFINITO_TEST_RUNNER:?INFINITO_TEST_RUNNER must be set}"
|
||||
: "${INFINITO_TEST_TYPE:?INFINITO_TEST_TYPE must be set}" # nocheck: makefile-supplied
|
||||
|
||||
RUN_SCRIPT_IN_CONTAINER="${INFINITO_SRC_DIR}/scripts/tests/code/run.sh"
|
||||
RUN_SCRIPT_IN_CONTAINER="${INFINITO_SRC_DIR}/${RUNNER_REL}"
|
||||
|
||||
case "${INFINITO_TEST_RUNNER}" in
|
||||
docker)
|
||||
|
||||
Reference in new issue
Block a user