2026-11-30 19:20:37 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
|
|
if [ -f /etc/os-release ]; then
|
|
|
|
|
# shellcheck source=/dev/null
|
|
|
|
|
. /etc/os-release
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Running tests inside distro: ${ID:-unknown}"
|
|
|
|
|
|
|
|
|
|
if [ -f "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh" ]; then
|
|
|
|
|
# shellcheck source=/dev/null
|
|
|
|
|
. "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ -f "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then
|
|
|
|
|
# shellcheck source=/dev/null
|
|
|
|
|
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
PATH="/nix/var/nix/profiles/default/bin:$HOME/.nix-profile/bin:$PATH"
|
|
|
|
|
|
|
|
|
|
command -v nix >/dev/null || {
|
|
|
|
|
echo "ERROR: nix not found."
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
|
|
|
|
|
2026-11-30 22:46:50 +00:00
|
|
|
bash scripts/test/container/safe-directory.sh
|
2026-11-30 19:20:37 +00:00
|
|
|
|
|
|
|
|
nix develop .#default --no-write-lock-file -c \
|
|
|
|
|
python3 -m unittest discover \
|
|
|
|
|
-s /opt/src/pkgmgr/tests/e2e \
|
|
|
|
|
-p "$TEST_PATTERN"
|