aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-27 14:15:03 -0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-27 14:15:03 -0400
commite6ab52cdd1df207c7a007a9cba665ee8a031d94a (patch)
tree82ed5470ed6e06a93789c18abeb473f2c58007a5 /tests
parent73acb8b836affe5dfade9dd6e3339ad2f9191add (diff)
Test "nix-env -qas" with the binary cache substituter
Diffstat (limited to 'tests')
-rw-r--r--tests/binary-cache.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/binary-cache.sh b/tests/binary-cache.sh
index b4a3601ec..b6951dd13 100644
--- a/tests/binary-cache.sh
+++ b/tests/binary-cache.sh
@@ -2,6 +2,7 @@ source common.sh
clearStore
+# Create the binary cache.
cacheDir=$TEST_ROOT/binary-cache
rm -rf $cacheDir
@@ -9,10 +10,12 @@ outPath=$(nix-build dependencies.nix --no-out-link)
nix-push --dest $cacheDir $outPath
+# Check that downloading works.
clearStore
-
rm -f $NIX_STATE_DIR/binary-cache*
+NIX_BINARY_CACHES="file://$cacheDir" nix-env -f dependencies.nix -qas \* | grep -- "--S"
+
NIX_BINARY_CACHES="file://$cacheDir" nix-store -r $outPath
nix-store --check-validity $outPath