mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 03:56:01 +01:00
shellcheck fix: tests/functional/local-overlay-store/delete-refs-inner.sh
This commit is contained in:
parent
62b36eba11
commit
326d626ad7
3 changed files with 10 additions and 10 deletions
|
|
@ -132,8 +132,6 @@
|
||||||
''^tests/functional/local-overlay-store/common\.sh$''
|
''^tests/functional/local-overlay-store/common\.sh$''
|
||||||
''^tests/functional/local-overlay-store/delete-duplicate-inner\.sh$''
|
''^tests/functional/local-overlay-store/delete-duplicate-inner\.sh$''
|
||||||
''^tests/functional/local-overlay-store/delete-duplicate\.sh$''
|
''^tests/functional/local-overlay-store/delete-duplicate\.sh$''
|
||||||
''^tests/functional/local-overlay-store/delete-refs-inner\.sh$''
|
|
||||||
''^tests/functional/local-overlay-store/delete-refs\.sh$''
|
|
||||||
''^tests/functional/logging\.sh$''
|
''^tests/functional/logging\.sh$''
|
||||||
''^tests/functional/misc\.sh$''
|
''^tests/functional/misc\.sh$''
|
||||||
''^tests/functional/multiple-outputs\.sh$''
|
''^tests/functional/multiple-outputs\.sh$''
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ initLowerStore
|
||||||
mountOverlayfs
|
mountOverlayfs
|
||||||
|
|
||||||
export NIX_REMOTE="$storeB"
|
export NIX_REMOTE="$storeB"
|
||||||
|
# shellcheck disable=SC2034
|
||||||
stateB="$storeBRoot/nix/var/nix"
|
stateB="$storeBRoot/nix/var/nix"
|
||||||
hermetic=$(nix-build ../hermetic.nix --no-out-link --arg busybox "$busybox" --arg withFinalRefs true --arg seed 2)
|
hermetic=$(nix-build ../hermetic.nix --no-out-link --arg busybox "$busybox" --arg withFinalRefs true --arg seed 2)
|
||||||
input1=$(nix-build ../hermetic.nix --no-out-link --arg busybox "$busybox" --arg withFinalRefs true --arg seed 2 -A passthru.input1 -j0)
|
input1=$(nix-build ../hermetic.nix --no-out-link --arg busybox "$busybox" --arg withFinalRefs true --arg seed 2 -A passthru.input1 -j0)
|
||||||
|
|
@ -22,18 +23,18 @@ input2=$(nix-build ../hermetic.nix --no-out-link --arg busybox "$busybox" --arg
|
||||||
input3=$(nix-build ../hermetic.nix --no-out-link --arg busybox "$busybox" --arg withFinalRefs true --arg seed 2 -A passthru.input3 -j0)
|
input3=$(nix-build ../hermetic.nix --no-out-link --arg busybox "$busybox" --arg withFinalRefs true --arg seed 2 -A passthru.input3 -j0)
|
||||||
|
|
||||||
# Can't delete because referenced
|
# Can't delete because referenced
|
||||||
expectStderr 1 nix-store --delete $input1 | grepQuiet "Cannot delete path"
|
expectStderr 1 nix-store --delete "$input1" | grepQuiet "Cannot delete path"
|
||||||
expectStderr 1 nix-store --delete $input2 | grepQuiet "Cannot delete path"
|
expectStderr 1 nix-store --delete "$input2" | grepQuiet "Cannot delete path"
|
||||||
expectStderr 1 nix-store --delete $input3 | grepQuiet "Cannot delete path"
|
expectStderr 1 nix-store --delete "$input3" | grepQuiet "Cannot delete path"
|
||||||
|
|
||||||
# These same paths are referenced in the lower layer (by the seed 1
|
# These same paths are referenced in the lower layer (by the seed 1
|
||||||
# build done in `initLowerStore`).
|
# build done in `initLowerStore`).
|
||||||
expectStderr 1 nix-store --store "$storeA" --delete $input2 | grepQuiet "Cannot delete path"
|
expectStderr 1 nix-store --store "$storeA" --delete "$input2" | grepQuiet "Cannot delete path"
|
||||||
expectStderr 1 nix-store --store "$storeA" --delete $input3 | grepQuiet "Cannot delete path"
|
expectStderr 1 nix-store --store "$storeA" --delete "$input3" | grepQuiet "Cannot delete path"
|
||||||
|
|
||||||
# Can delete
|
# Can delete
|
||||||
nix-store --delete $hermetic
|
nix-store --delete "$hermetic"
|
||||||
|
|
||||||
# Now unreferenced in upper layer, can delete
|
# Now unreferenced in upper layer, can delete
|
||||||
nix-store --delete $input3
|
nix-store --delete "$input3"
|
||||||
nix-store --delete $input2
|
nix-store --delete "$input2"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
# shellcheck shell=bash
|
||||||
source common.sh
|
source common.sh
|
||||||
source ../common/init.sh
|
source ../common/init.sh
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue