aboutsummaryrefslogtreecommitdiff
path: root/tests/nix-build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nix-build.sh')
-rw-r--r--tests/nix-build.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/nix-build.sh b/tests/nix-build.sh
index dc0e99c73..395264863 100644
--- a/tests/nix-build.sh
+++ b/tests/nix-build.sh
@@ -2,7 +2,7 @@ source common.sh
clearStore
-nix-build dependencies.nix -o $TEST_ROOT/result
+outPath=$(nix-build dependencies.nix -o $TEST_ROOT/result)
test "$(cat $TEST_ROOT/result/foobar)" = FOOBAR
# The result should be retained by a GC.
@@ -17,3 +17,9 @@ test -e $target/foobar
rm $TEST_ROOT/result
nix-store --gc
if test -e $target/foobar; then false; fi
+
+outPath2=$(nix-build $(nix-instantiate dependencies.nix) --no-out-link)
+[[ $outPath = $outPath2 ]]
+
+outPath2=$(nix-build $(nix-instantiate dependencies.nix)!out --no-out-link)
+[[ $outPath = $outPath2 ]]