mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
Add a test for nix-store --dump-db / --load-db
This commit is contained in:
parent
506d86394d
commit
fdff3a7eae
2 changed files with 21 additions and 1 deletions
20
tests/dump-db.sh
Normal file
20
tests/dump-db.sh
Normal file
|
@ -0,0 +1,20 @@
|
|||
source common.sh
|
||||
|
||||
clearStore
|
||||
|
||||
path=$(nix-build dependencies.nix -o $TEST_ROOT/result)
|
||||
|
||||
deps="$(nix-store -qR $TEST_ROOT/result)"
|
||||
|
||||
nix-store --dump-db > $TEST_ROOT/dump
|
||||
|
||||
rm -rf $NIX_DB_DIR
|
||||
|
||||
nix-store --load-db < $TEST_ROOT/dump
|
||||
|
||||
deps2="$(nix-store -qR $TEST_ROOT/result)"
|
||||
|
||||
[ "$deps" = "$deps2" ];
|
||||
|
||||
nix-store --dump-db > $TEST_ROOT/dump2
|
||||
cmp $TEST_ROOT/dump $TEST_ROOT/dump2
|
Loading…
Add table
Add a link
Reference in a new issue