#!/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 } bash scripts/test/container/safe-directory.sh nix develop .#default --no-write-lock-file -c \ python3 -m unittest discover \ -s /opt/src/pkgmgr/tests/e2e \ -p "$TEST_PATTERN"