1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 19:01:16 +02:00
nix/tests/functional/derivation-advanced-attributes.sh
wh0 d1894f3456
tests: derivation-advanced-attributes unset NIX_STORE
when built by nix, NIX_STORE is set, which breaks $got when it
is not the default /nix/store
2024-12-04 23:21:07 -08:00

23 lines
515 B
Bash
Executable file

#!/usr/bin/env bash
source common/test-root.sh
source common/paths.sh
set -eu -o pipefail
source characterisation/framework.sh
badDiff=0
badExitCode=0
store="$TEST_ROOT/store"
for nixFile in derivation/*.nix; do
drvPath=$(env -u NIX_STORE nix-instantiate --store "$store" --pure-eval --expr "$(< "$nixFile")")
testName=$(basename "$nixFile" .nix)
got="${store}${drvPath}"
expected="derivation/$testName.drv"
diffAndAcceptInner "$testName" "$got" "$expected"
done
characterisationTestExit