diff options
Diffstat (limited to 'tests/fallback.sh')
-rw-r--r-- | tests/fallback.sh | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/fallback.sh b/tests/fallback.sh index b859d74ee707..081e5695f400 100644 --- a/tests/fallback.sh +++ b/tests/fallback.sh @@ -1,15 +1,14 @@ storeExpr=$($TOP/src/nix-instantiate/nix-instantiate fallback.nix) - echo "store expr is $storeExpr" -# Register a non-existant successor (and a nox-existant substitute). -suc=$NIX_STORE_DIR/deadbeafdeadbeafdeadbeafdeadbeaf-s.store -(echo $suc && echo $TOP/no-such-program && echo 0) | $TOP/src/nix-store/nix-store --substitute -$TOP/src/nix-store/nix-store --successor $storeExpr $suc +outPath=$($TOP/src/nix-store/nix-store -q --fallback "$storeExpr") +echo "output path is $outPath" -outPath=$($TOP/src/nix-store/nix-store -qnf --fallback "$storeExpr") +# Register a non-existant substitute +(echo $outPath && echo $TOP/no-such-program && echo 0) | $TOP/src/nix-store/nix-store --substitute -echo "output path is $outPath" +# Build the derivation +$TOP/src/nix-store/nix-store -r --fallback "$storeExpr" text=$(cat "$outPath"/hello) if test "$text" != "Hello World!"; then exit 1; fi |