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

@ -2,19 +2,19 @@ source common.sh
clearStore
drvPath=$($nixinstantiate simple.nix)
drvPath=$(nix-instantiate simple.nix)
echo "derivation is $drvPath"
outPath=$($nixstore -q --fallback "$drvPath")
outPath=$(nix-store -q --fallback "$drvPath")
echo "output path is $outPath"
# Build with a substitute that fails. This should fail.
export NIX_SUBSTITUTERS=$(pwd)/substituter2.sh
if $nixstore -r "$drvPath"; then echo unexpected fallback; exit 1; fi
if nix-store -r "$drvPath"; then echo unexpected fallback; exit 1; fi
# Build with a substitute that fails. This should fall back to a source build.
export NIX_SUBSTITUTERS=$(pwd)/substituter2.sh
$nixstore -r --fallback "$drvPath"
nix-store -r --fallback "$drvPath"
text=$(cat "$outPath"/hello)
if test "$text" != "Hello World!"; then exit 1; fi