mirror of
https://github.com/NixOS/nix.git
synced 2025-11-30 14:10:59 +01:00
Merge commit 'aa99005004' into ca-drv-exotic
This commit is contained in:
commit
f7f44f7c96
315 changed files with 6194 additions and 3610 deletions
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
source common.sh
|
||||
|
||||
drv=$(nix-instantiate --experimental-features ca-derivations ./content-addressed.nix -A rootCA --arg seed 1)
|
||||
nix --experimental-features 'nix-command ca-derivations' show-derivation "$drv" --arg seed 1
|
||||
drv=$(nix-instantiate ./content-addressed.nix -A rootCA --arg seed 1)
|
||||
nix show-derivation "$drv" --arg seed 1
|
||||
|
||||
buildAttr () {
|
||||
local derivationPath=$1
|
||||
local seedValue=$2
|
||||
shift; shift
|
||||
local args=("--experimental-features" "ca-derivations" "./content-addressed.nix" "-A" "$derivationPath" --arg seed "$seedValue" "--no-out-link")
|
||||
local args=("./content-addressed.nix" "-A" "$derivationPath" --arg seed "$seedValue" "--no-out-link")
|
||||
args+=("$@")
|
||||
nix-build "${args[@]}"
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ testRemoteCache () {
|
|||
local outPath=$(buildAttr dependentNonCA 1)
|
||||
nix copy --to file://$cacheDir $outPath
|
||||
clearStore
|
||||
buildAttr dependentNonCA 1 --option substituters file://$cacheDir --no-require-sigs |& (! grep "building dependent-non-ca")
|
||||
buildAttr dependentNonCA 1 --option substituters file://$cacheDir --no-require-sigs |& grepQuietInverse "building dependent-non-ca"
|
||||
}
|
||||
|
||||
testDeterministicCA () {
|
||||
|
|
@ -46,17 +46,17 @@ testCutoff () {
|
|||
}
|
||||
|
||||
testGC () {
|
||||
nix-instantiate --experimental-features ca-derivations ./content-addressed.nix -A rootCA --arg seed 5
|
||||
nix-collect-garbage --experimental-features ca-derivations --option keep-derivations true
|
||||
nix-instantiate ./content-addressed.nix -A rootCA --arg seed 5
|
||||
nix-collect-garbage --option keep-derivations true
|
||||
clearStore
|
||||
buildAttr rootCA 1 --out-link $TEST_ROOT/rootCA
|
||||
nix-collect-garbage --experimental-features ca-derivations
|
||||
nix-collect-garbage
|
||||
buildAttr rootCA 1 -j0
|
||||
}
|
||||
|
||||
testNixCommand () {
|
||||
clearStore
|
||||
nix build --experimental-features 'nix-command ca-derivations' --file ./content-addressed.nix --no-link
|
||||
nix build --file ./content-addressed.nix --no-link
|
||||
}
|
||||
|
||||
# Regression test for https://github.com/NixOS/nix/issues/4775
|
||||
|
|
|
|||
|
|
@ -28,6 +28,12 @@ nix realisation info --file ./content-addressed.nix transitivelyDependentCA
|
|||
nix realisation info --file ./content-addressed.nix dependentCA
|
||||
# nix realisation info --file ./content-addressed.nix rootCA --outputs out
|
||||
|
||||
if isDaemonNewer "2.13"; then
|
||||
pushToStore="../push-to-store.sh"
|
||||
else
|
||||
pushToStore="../push-to-store-old.sh"
|
||||
fi
|
||||
|
||||
# Same thing, but
|
||||
# 1. With non-ca derivations
|
||||
# 2. Erasing the realisations on the remote store
|
||||
|
|
@ -37,7 +43,7 @@ nix realisation info --file ./content-addressed.nix dependentCA
|
|||
#
|
||||
# Regression test for #4725
|
||||
clearStore
|
||||
nix build --file ../simple.nix -L --no-link --post-build-hook ../push-to-store.sh
|
||||
nix build --file ../simple.nix -L --no-link --post-build-hook "$pushToStore"
|
||||
clearStore
|
||||
rm -r "$REMOTE_STORE_DIR/realisations"
|
||||
nix build --file ../simple.nix -L --no-link --substitute --substituters "$REMOTE_STORE" --no-require-sigs -j0
|
||||
|
|
@ -52,7 +58,7 @@ if [[ -z "$(ls "$REMOTE_STORE_DIR/realisations")" ]]; then
|
|||
fi
|
||||
|
||||
# Test the local realisation disk cache
|
||||
buildDrvs --post-build-hook ../push-to-store.sh
|
||||
buildDrvs --post-build-hook "$pushToStore"
|
||||
clearStore
|
||||
# Add the realisations of rootCA to the cachecache
|
||||
clearCacheCache
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue