about summary refs log tree commit diff
path: root/tests/fallback.sh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-08-13T13·15+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-08-13T13·15+0000
commit550ba9ebb4b1b2415c9930879cfa6937f7fa916a (patch)
tree3c15b0a01c59be162a17bb003d09fbd80ba01aa1 /tests/fallback.sh
parent3757ee589f46a401fdacaa2126e6bf4902eee23d (diff)
* Fix the tests.
Diffstat (limited to 'tests/fallback.sh')
-rw-r--r--tests/fallback.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/fallback.sh b/tests/fallback.sh
index 482e4ce5b72c..24889a452881 100644
--- a/tests/fallback.sh
+++ b/tests/fallback.sh
@@ -1,15 +1,19 @@
 source common.sh
 
-drvPath=$($nixinstantiate fallback.nix)
+clearStore
+
+drvPath=$($nixinstantiate simple.nix)
 echo "derivation is $drvPath"
 
 outPath=$($nixstore -q --fallback "$drvPath")
 echo "output path is $outPath"
 
-# Register a non-existant substitute
-(echo $outPath && echo "" && echo $TOP/no-such-program && echo 0 && echo 0) | $nixstore --register-substitutes
+# 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
 
-# Build the derivation
+# Build with a substitute that fails.  This should fall back to a source build.
+export NIX_SUBSTITUTERS=$(pwd)/substituter2.sh
 $nixstore -r --fallback "$drvPath"
 
 text=$(cat "$outPath"/hello)