about summary refs log tree commit diff
path: root/tests/dependencies.sh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-02-09T12·57+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-02-09T12·57+0000
commit98df735b5149bc1e39ce6b0bae13fbf7cebcdc05 (patch)
tree9a9549e0689400b71e230ba51317a2590969b63d /tests/dependencies.sh
parent582e01c06f9ecee25a31c34562926b41dc2856eb (diff)
* Propagate the deriver of a path through the substitute mechanism.
* Removed some dead code (successor stuff) from nix-push.
* Updated terminology in the tests (store expr -> drv path).
* Check that the deriver is set properly in the tests.

Diffstat (limited to 'tests/dependencies.sh')
-rw-r--r--tests/dependencies.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/dependencies.sh b/tests/dependencies.sh
index 56cb1e4c38d4..87f0682ac438 100644
--- a/tests/dependencies.sh
+++ b/tests/dependencies.sh
@@ -1,15 +1,15 @@
-storeExpr=$($TOP/src/nix-instantiate/nix-instantiate dependencies.nix)
+drvPath=$($TOP/src/nix-instantiate/nix-instantiate dependencies.nix)
 
-echo "store expr is $storeExpr"
+echo "derivation is $drvPath"
 
-outPath=$($TOP/src/nix-store/nix-store -rvv "$storeExpr")
+outPath=$($TOP/src/nix-store/nix-store -rvv "$drvPath")
 
 echo "output path is $outPath"
 
 text=$(cat "$outPath"/foobar)
 if test "$text" != "FOOBAR"; then exit 1; fi
 
-deps=$($TOP/src/nix-store/nix-store -quR "$storeExpr")
+deps=$($TOP/src/nix-store/nix-store -quR "$drvPath")
 
 echo "output closure contains $deps"
 
@@ -24,3 +24,7 @@ input2OutPath=$(echo "$deps" | grep "dependencies-input-2")
 
 # The referers closure of input-2 should include outPath.
 $TOP/src/nix-store/nix-store -q --referers-closure "$input2OutPath" | grep "$outPath"
+
+# Check that the derivers are set properly.
+test $($TOP/src/nix-store/nix-store -q --deriver "$outPath") = "$drvPath"
+$TOP/src/nix-store/nix-store -q --deriver "$input2OutPath" | grep -q -- "-input-2.drv"