From a29c8ac51ca813a34eebb497340807e4b274170c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 24 Jun 2004 14:35:01 +0000 Subject: * Add a test to check that when we cannot realise a closure expression, we should invalidate it and go back to the derivation for which it is a successor. --- tests/fall-back.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/fall-back.sh (limited to 'tests/fall-back.sh') diff --git a/tests/fall-back.sh b/tests/fall-back.sh new file mode 100644 index 000000000000..a183e12f670c --- /dev/null +++ b/tests/fall-back.sh @@ -0,0 +1,14 @@ +storeExpr=$($TOP/src/nix-instantiate/nix-instantiate fall-back.nix) + +echo "store expr is $storeExpr" + +# Register a non-existant successor. +suc=$NIX_STORE_DIR/deadbeafdeadbeafdeadbeafdeadbeaf-s.store +$TOP/src/nix-store/nix-store --successor $storeExpr $suc + +outPath=$($TOP/src/nix-store/nix-store -qnfvvvvv "$storeExpr") + +echo "output path is $outPath" + +text=$(cat "$outPath"/hello) +if test "$text" != "Hello World!"; then exit 1; fi -- cgit 1.4.1