about summary refs log tree commit diff
path: root/tests/fallback.sh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-01-25T13·00+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-01-25T13·00+0000
commitc6290e42bc8890e2036013773a98e3551352c91a (patch)
tree898c4017359d92cd942be6890d298e0574dee1c1 /tests/fallback.sh
parent581fc477838e9cf9e5d9657920ef63ea836050ee (diff)
* Fix the `--fallback' switch.
* Fix the substitutes tests.

Diffstat (limited to 'tests/fallback.sh')
-rw-r--r--tests/fallback.sh13
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