diff --git a/tests/overlay-local-store/inner.sh b/tests/overlay-local-store/inner.sh index 1cb29ceb7..d13d8b9ab 100755 --- a/tests/overlay-local-store/inner.sh +++ b/tests/overlay-local-store/inner.sh @@ -55,18 +55,26 @@ expect 1 stat $(toRealPath "$storeBTop" "$path") # Checking for path in overlay store matching lower layer diff $(toRealPath "$storeA/nix/store" "$path") $(toRealPath "$TEST_ROOT/merged-store/nix/store" "$path") -# Verifying path in lower layer -nix-store --verify-path --store "$storeA" "$path" - -# Verifying path in merged-store -nix-store --verify-path --store "$storeB" "$path" +# Checking derivers query agreement +[[ \ + $(nix-store --store $storeA --query --deriver $path) \ + == \ + $(nix-store --store $storeB --query --deriver $path) \ + ]] +# Checking outputs query agreement [[ \ $(nix-store --store $storeA --query --outputs $drvPath) \ == \ $(nix-store --store $storeB --query --outputs $drvPath) \ ]] +# Verifying path in lower layer +nix-store --verify-path --store "$storeA" "$path" + +# Verifying path in merged-store +nix-store --verify-path --store "$storeB" "$path" + hashPart=$(echo $path | sed "s^$NIX_STORE_DIR/^^" | sed 's/-.*//') # Lower store can find from hash part