1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 18:31:49 +02:00

* Refactoring: remove unnecessary variables from the tests.

This commit is contained in:
Eelco Dolstra 2011-10-10 21:32:34 +00:00
parent cd6d02c366
commit 8af7d766f0
33 changed files with 220 additions and 235 deletions

View file

@ -4,23 +4,23 @@ clearStore
clearProfiles
checkRef() {
$nixstore -q --references ./result | grep -q "$1" || fail "missing reference $1"
nix-store -q --references ./result | grep -q "$1" || fail "missing reference $1"
}
# Test the export of the runtime dependency graph.
outPath=$($nixbuild ./export-graph.nix -A runtimeGraph)
outPath=$(nix-build ./export-graph.nix -A runtimeGraph)
test $($nixstore -q --references ./result | wc -l) = 2 || fail "bad nr of references"
test $(nix-store -q --references ./result | wc -l) = 2 || fail "bad nr of references"
checkRef input-2
for i in $(cat $outPath); do checkRef $i; done
# Test the export of the build-time dependency graph.
$nixstore --gc # should force rebuild of input-1
nix-store --gc # should force rebuild of input-1
outPath=$($nixbuild ./export-graph.nix -A buildGraph)
outPath=$(nix-build ./export-graph.nix -A buildGraph)
checkRef input-1
checkRef input-1.drv