mirror of
https://github.com/NixOS/nix
synced 2025-07-07 18:31:49 +02:00
Functional test for derivation "advanced attrs"
This tests the Nix language side of things. We are purposely skipping most of `common.sh` because it is overkill for this test: we don't want to have an "overfit" test environment. Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
This commit is contained in:
parent
490ca93cf8
commit
9f9984e4d0
14 changed files with 155 additions and 11 deletions
23
tests/functional/derivation-advanced-attributes.sh
Executable file
23
tests/functional/derivation-advanced-attributes.sh
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source common/test-root.sh
|
||||
source common/paths.sh
|
||||
|
||||
set -o pipefail
|
||||
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue