Test nix-instantiate with binary cache store
Trying to make sure it work with obscurers stores.
This commit is contained in:
parent
a93916b190
commit
29bd63e990
1 changed files with 9 additions and 4 deletions
|
@ -1,15 +1,20 @@
|
||||||
source common.sh
|
source common.sh
|
||||||
|
|
||||||
|
# We can produce drvs directly into the binary cache
|
||||||
clearStore
|
clearStore
|
||||||
clearCache
|
clearCacheCache
|
||||||
|
nix-instantiate --store "file://$cacheDir" dependencies.nix
|
||||||
|
|
||||||
# Create the binary cache.
|
# Create the binary cache.
|
||||||
|
clearStore
|
||||||
|
clearCache
|
||||||
outPath=$(nix-build dependencies.nix --no-out-link)
|
outPath=$(nix-build dependencies.nix --no-out-link)
|
||||||
|
|
||||||
nix copy --to file://$cacheDir $outPath
|
nix copy --to file://$cacheDir $outPath
|
||||||
|
|
||||||
|
|
||||||
basicTests() {
|
basicDownloadTests() {
|
||||||
|
# No uploading tests bcause upload with force HTTP doesn't work.
|
||||||
|
|
||||||
# By default, a binary cache doesn't support "nix-env -qas", but does
|
# By default, a binary cache doesn't support "nix-env -qas", but does
|
||||||
# support installation.
|
# support installation.
|
||||||
|
@ -44,12 +49,12 @@ basicTests() {
|
||||||
|
|
||||||
|
|
||||||
# Test LocalBinaryCacheStore.
|
# Test LocalBinaryCacheStore.
|
||||||
basicTests
|
basicDownloadTests
|
||||||
|
|
||||||
|
|
||||||
# Test HttpBinaryCacheStore.
|
# Test HttpBinaryCacheStore.
|
||||||
export _NIX_FORCE_HTTP=1
|
export _NIX_FORCE_HTTP=1
|
||||||
basicTests
|
basicDownloadTests
|
||||||
|
|
||||||
|
|
||||||
# Test whether Nix notices if the NAR doesn't match the hash in the NAR info.
|
# Test whether Nix notices if the NAR doesn't match the hash in the NAR info.
|
||||||
|
|
Loading…
Reference in a new issue