mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-01-19 09:36:47 +02:00
Add test for store optimise path deduplication.
This commit is contained in:
parent
d5cd74a401
commit
614efc1240
5 changed files with 33 additions and 1 deletions
|
@ -188,6 +188,11 @@ void LocalOverlayStore::deleteGCPath(const Path & path, uint64_t & bytesFreed)
|
|||
}
|
||||
}
|
||||
|
||||
void LocalOverlayStore::optimiseStore()
|
||||
{
|
||||
warn("not implemented");
|
||||
}
|
||||
|
||||
bool LocalOverlayStore::verifyStore(bool checkContents, RepairFlag repair)
|
||||
{
|
||||
if (repair)
|
||||
|
|
|
@ -113,6 +113,8 @@ private:
|
|||
|
||||
void deleteGCPath(const Path & path, uint64_t & bytesFreed) override;
|
||||
|
||||
void optimiseStore() override;
|
||||
|
||||
bool verifyStore(bool checkContents, RepairFlag repair) override;
|
||||
};
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ overlay-local-store-tests := \
|
|||
$(d)/build.sh \
|
||||
$(d)/bad-uris.sh \
|
||||
$(d)/add-lower.sh \
|
||||
$(d)/verify.sh
|
||||
$(d)/verify.sh \
|
||||
$(d)/optimise.sh
|
||||
|
||||
install-tests-groups += overlay-local-store
|
||||
|
|
19
tests/overlay-local-store/optimise-inner.sh
Executable file
19
tests/overlay-local-store/optimise-inner.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -eu -o pipefail
|
||||
|
||||
set -x
|
||||
|
||||
source common.sh
|
||||
|
||||
# Avoid store dir being inside sandbox build-dir
|
||||
unset NIX_STORE_DIR
|
||||
unset NIX_STATE_DIR
|
||||
|
||||
storeDirs
|
||||
|
||||
initLowerStore
|
||||
|
||||
mountOverlayfs
|
||||
|
||||
nix-store --store "$storeB" --optimise
|
5
tests/overlay-local-store/optimise.sh
Executable file
5
tests/overlay-local-store/optimise.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
source common.sh
|
||||
|
||||
requireEnvironment
|
||||
setupConfig
|
||||
execUnshare ./optimise-inner.sh
|
Loading…
Reference in a new issue