Test whether --fallback works if NARS have disappeared from the binary cache

This commit is contained in:
Eelco Dolstra 2013-04-23 12:44:01 +02:00
parent c642441beb
commit a9b4e26b5c

View file

@ -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