2025-12-09 05:31:55 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
|
|
echo "============================================================"
|
|
|
|
|
echo ">>> Running UNIT tests in Arch container"
|
|
|
|
|
echo "============================================================"
|
|
|
|
|
|
|
|
|
|
docker run --rm \
|
|
|
|
|
-v "$(pwd):/src" \
|
2025-12-10 20:07:41 +01:00
|
|
|
-v "pkgmgr_nix_cache_${distro}:/root/.cache/nix" \
|
|
|
|
|
-v pkgmgr_nix_store_${distro}:/nix \
|
2025-12-09 05:31:55 +01:00
|
|
|
--workdir /src \
|
|
|
|
|
-e PKGMGR_DEV=1 \
|
2025-12-09 17:53:10 +01:00
|
|
|
-e TEST_PATTERN="${TEST_PATTERN}" \
|
2025-12-09 05:31:55 +01:00
|
|
|
--entrypoint bash \
|
|
|
|
|
"package-manager-test-arch" \
|
|
|
|
|
-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 \
|
2025-12-09 17:53:10 +01:00
|
|
|
-p "$TEST_PATTERN";
|
2025-12-09 05:31:55 +01:00
|
|
|
'
|