Add a test for the binary cache substituter

This commit is contained in:
Eelco Dolstra 2012-07-26 17:13:14 -04:00
parent 7861260a5f
commit 609586a16d
2 changed files with 21 additions and 1 deletions

View file

@ -9,7 +9,8 @@ TESTS = init.sh hash.sh lang.sh add.sh simple.sh dependencies.sh \
gc-runtime.sh install-package.sh check-refs.sh filter-source.sh \ gc-runtime.sh install-package.sh check-refs.sh filter-source.sh \
remote-store.sh export.sh export-graph.sh negative-caching.sh \ remote-store.sh export.sh export-graph.sh negative-caching.sh \
binary-patching.sh timeout.sh secure-drv-outputs.sh nix-channel.sh \ binary-patching.sh timeout.sh secure-drv-outputs.sh nix-channel.sh \
multiple-outputs.sh import-derivation.sh fetchurl.sh optimise-store.sh multiple-outputs.sh import-derivation.sh fetchurl.sh optimise-store.sh \
binary-cache.sh
XFAIL_TESTS = XFAIL_TESTS =

19
tests/binary-cache.sh Normal file
View file

@ -0,0 +1,19 @@
source common.sh
clearStore
cacheDir=$TEST_ROOT/binary-cache
rm -rf $cacheDir
outPath=$(nix-build dependencies.nix --no-out-link)
nix-push --dest $cacheDir $outPath
clearStore
rm -f $NIX_STATE_DIR/binary-cache*
NIX_BINARY_CACHES="file://$cacheDir" nix-store -r $outPath
nix-store --check-validity $outPath
nix-store -qR $outPath | grep input-2