From 3c4c30eadd879f512ac2075a7ba39c37ff77bf5c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 19 Jan 2018 14:53:34 +0100 Subject: Rewrite builtin derivation environment Also add a test. Fixes #1803. Closes #1805. --- tests/check.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/check.sh') diff --git a/tests/check.sh b/tests/check.sh index 3efcef044921..a3067e06f149 100644 --- a/tests/check.sh +++ b/tests/check.sh @@ -16,3 +16,17 @@ nix-build dependencies.nix --no-out-link --repeat 3 (! nix-build check.nix -A nondeterministic --no-out-link --repeat 1 2> $TEST_ROOT/log) grep 'differs from previous round' $TEST_ROOT/log +path=$(nix-build check.nix -A fetchurl --no-out-link) + +chmod +w $path +echo foo > $path +chmod -w $path + +nix-build check.nix -A fetchurl --no-out-link --check + +# Note: "check" doesn't repair anything, it just compares to the hash stored in the database. +[[ $(cat $path) = foo ]] + +nix-build check.nix -A fetchurl --no-out-link --repair + +[[ $(cat $path) != foo ]] -- cgit 1.4.1