make-container: fix renamed variable

The variable was only renamed in run-tests.sh, which broke containers.
This commit is contained in:
Erik Arvstedt 2020-12-16 01:28:11 +01:00
parent 7928495e45
commit a5a2fc7274
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -57,8 +57,8 @@ if [[ $EUID != 0 ]]; then
# NixOS containers require root permissions. # NixOS containers require root permissions.
# By using sudo here and not at the user's call-site extra-container can detect if it is running # By using sudo here and not at the user's call-site extra-container can detect if it is running
# inside an existing shell session (by checking an internal environment variable). # inside an existing shell session (by checking an internal environment variable).
exec sudo scenario="$scenario" testDir="$testDir" NIX_PATH="$NIX_PATH" PATH="$PATH" \ exec sudo scenario="$scenario" scriptDir="$scriptDir" NIX_PATH="$NIX_PATH" PATH="$PATH" \
scenarioOverridesFile="${scenarioOverridesFile:-}" "$testDir/lib/make-container.sh" "$@" scenarioOverridesFile="${scenarioOverridesFile:-}" "$scriptDir/lib/make-container.sh" "$@"
fi fi
export containerName=nb-test export containerName=nb-test
@ -79,11 +79,11 @@ done
containerBin=$(type -P extra-container) || true containerBin=$(type -P extra-container) || true
if [[ ! ($containerBin && $(realpath $containerBin) == *extra-container-0.5*) ]]; then if [[ ! ($containerBin && $(realpath $containerBin) == *extra-container-0.5*) ]]; then
echo "Building extra-container. Skip this step by adding extra-container 0.5 to PATH." echo "Building extra-container. Skip this step by adding extra-container 0.5 to PATH."
nix-build --out-link /tmp/extra-container "$testDir"/../pkgs -A extra-container >/dev/null nix-build --out-link /tmp/extra-container "$scriptDir"/../pkgs -A extra-container >/dev/null
export PATH="/tmp/extra-container/bin${PATH:+:}$PATH" export PATH="/tmp/extra-container/bin${PATH:+:}$PATH"
fi fi
read -d '' src <<EOF || true read -d '' src <<EOF || true
(import "$testDir/tests.nix" { scenario = "$scenario"; }).container (import "$scriptDir/tests.nix" { scenario = "$scenario"; }).container
EOF EOF
exec extra-container $containerCommand -E "$src" "$@" exec extra-container $containerCommand -E "$src" "$@"