2024-06-08 11:10:51 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
source common/test-root.sh
|
|
|
|
source common/paths.sh
|
|
|
|
|
2024-07-08 20:07:06 +00:00
|
|
|
set -eu -o pipefail
|
2024-06-08 11:10:51 +00:00
|
|
|
|
|
|
|
source characterisation/framework.sh
|
|
|
|
|
|
|
|
badDiff=0
|
|
|
|
badExitCode=0
|
|
|
|
|
|
|
|
store="$TEST_ROOT/store"
|
|
|
|
|
|
|
|
for nixFile in derivation/*.nix; do
|
|
|
|
drvPath=$(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
|