nixos/tests/blivet: Fix by avoiding "nix-store".
The "nix-store" command within the VM test is running without NIX_REMOTE=daemon and since Nix 1.8 tries to open the store database in read-write mode even for nix-store -qR. Now, we're doing this properly and rely on setup hooks, which is the same method that's used when you're building a library which depends on blivet. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
ac603e208c
commit
2af435b5cd
|
@ -43,11 +43,6 @@ import ./make-test.nix ({ pkgs, ... }: with pkgs.pythonPackages; rec {
|
|||
TMPDIR=/tmp/xchg/bigtmp
|
||||
export TMPDIR
|
||||
|
||||
mkPythonPath() {
|
||||
nix-store -qR "$@" \
|
||||
| sed -e 's|$|/lib/${pkgs.python.libPrefix}/site-packages|'
|
||||
}
|
||||
|
||||
cp -Rd "${blivet.src}/tests" .
|
||||
|
||||
# Skip SELinux tests
|
||||
|
@ -73,8 +68,11 @@ import ./make-test.nix ({ pkgs, ... }: with pkgs.pythonPackages; rec {
|
|||
-e 's|_STORE_FILE_PATH = .*|_STORE_FILE_PATH = tempfile.gettempdir()|' \
|
||||
tests/loopbackedtestcase.py
|
||||
|
||||
PYTHONPATH=".:$(mkPythonPath "${blivet}" "${mock}" | paste -sd :)" \
|
||||
python "${pythonTestRunner}"
|
||||
PYTHONPATH=".:$(< "${pkgs.stdenv.mkDerivation {
|
||||
name = "blivet-pythonpath";
|
||||
buildInputs = [ blivet mock ];
|
||||
buildCommand = "echo \"$PYTHONPATH\" > \"$out\"";
|
||||
}}")" python "${pythonTestRunner}"
|
||||
'';
|
||||
|
||||
testScript = ''
|
||||
|
|
Loading…
Reference in a new issue