about summary refs log tree commit diff
path: root/tests/dependencies.sh
diff options
context:
space:
mode:
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"