- Pass `distro=arch` from Makefile into test scripts
- Replace hardcoded "arch" references with "${distro}"
- Update test-unit.sh and test-integration.sh to use dynamic image names
- Improve log output to reflect selected distro
https://chatgpt.com/share/6939c98a-d428-800f-8bb8-cf72e80ba80c
26 lines
736 B
Bash
Executable File
26 lines
736 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
echo "============================================================"
|
|
echo ">>> Running UNIT tests in ${distro} container"
|
|
echo "============================================================"
|
|
|
|
docker run --rm \
|
|
-v "$(pwd):/src" \
|
|
-v "pkgmgr_nix_cache_${distro}:/root/.cache/nix" \
|
|
-v pkgmgr_nix_store_${distro}:/nix \
|
|
--workdir /src \
|
|
-e PKGMGR_DEV=1 \
|
|
-e TEST_PATTERN="${TEST_PATTERN}" \
|
|
--entrypoint bash \
|
|
"package-manager-test-${distro}" \
|
|
-c '
|
|
set -e;
|
|
git config --global --add safe.directory /src || true;
|
|
nix develop .#default --no-write-lock-file -c \
|
|
python -m unittest discover \
|
|
-s tests/unit \
|
|
-t /src \
|
|
-p "$TEST_PATTERN";
|
|
'
|