aboutsummaryrefslogtreecommitdiff
path: root/tests/binary-cache.sh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-04-23 12:44:01 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-04-23 12:44:01 +0200
commita9b4e26b5c3ce6259526fe038c771b9325d3e99e (patch)
tree40e51c58e22a4952cfc660ed80539da2bca13f0f /tests/binary-cache.sh
parentc642441beb504278819e43914516b5eda30f2c15 (diff)
Test whether --fallback works if NARS have disappeared from the binary cache
Diffstat (limited to 'tests/binary-cache.sh')
-rw-r--r--tests/binary-cache.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/binary-cache.sh b/tests/binary-cache.sh
index b02456220..878c4669b 100644
--- a/tests/binary-cache.sh
+++ b/tests/binary-cache.sh
@@ -40,6 +40,20 @@ nix-store --check-validity $outPath
nix-store -qR $outPath | grep input-2
+# Test whether fallback works if we have cached info but the
+# corresponding NAR has disappeared.
+clearStore
+
+nix-build --option binary-caches "file://$cacheDir" dependencies.nix --dry-run # get info
+
+mkdir $cacheDir/tmp
+mv $cacheDir/*.nar.xz $cacheDir/tmp/
+
+NIX_DEBUG_SUBST=1 nix-build --option binary-caches "file://$cacheDir" dependencies.nix -o $TEST_ROOT/result --fallback
+
+mv $cacheDir/tmp/* $cacheDir/
+
+
# Test whether building works if the binary cache contains an
# incomplete closure.
clearStore