Files
DroidDeck/tools/test_local.sh
T
2026-10-13 21:27:42 -04:00

12 lines
497 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
repo_root=$(CDPATH= cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
cd "$repo_root"
if [[ $(uname -s) == Linux ]]; then
exec python3 -m unittest discover -s tools/tests "$@"
fi
image=${DROIDDECK_BUILD_IMAGE:-droiddeck-local-cross:24.04-v3}
python3 tools/docker_preflight.py "$image"
exec docker run --rm --platform linux/amd64 --user "$(id -u):$(id -g)" \
-v "$repo_root:/src:ro" -w /src "$image" python3 -m unittest discover -s tools/tests "$@"