Restore --init calls in tests

This commit is contained in:
Eelco Dolstra 2019-03-04 18:27:45 +08:00
parent 4cfc131ec4
commit b71e1fb342
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 4 additions and 0 deletions

View file

@ -53,6 +53,7 @@ clearStore() {
mkdir "$NIX_STORE_DIR" mkdir "$NIX_STORE_DIR"
rm -rf "$NIX_STATE_DIR" rm -rf "$NIX_STATE_DIR"
mkdir "$NIX_STATE_DIR" mkdir "$NIX_STATE_DIR"
nix-store --init
clearProfiles clearProfiles
} }

View file

@ -25,6 +25,9 @@ fsync-metadata = false
!include nix.conf.extra.not-there !include nix.conf.extra.not-there
EOF EOF
# Initialise the database.
nix-store --init
# Did anything happen? # Did anything happen?
test -e "$NIX_STATE_DIR"/db/db.sqlite test -e "$NIX_STATE_DIR"/db/db.sqlite