summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2014-12-18 13:14:02 +0100
committeraszlig <aszlig@redmoonstudios.org>2014-12-18 14:06:13 +0100
commit2af435b5cd74140bf8ee6c476793ee6ed7c1cba4 (patch)
treea00088b5d005ae122a5f112dd77248332fb1f648 /nixos
parentac603e208c98b260db675fa0c13be94fa95216f4 (diff)
downloadnixlib-2af435b5cd74140bf8ee6c476793ee6ed7c1cba4.tar
nixlib-2af435b5cd74140bf8ee6c476793ee6ed7c1cba4.tar.gz
nixlib-2af435b5cd74140bf8ee6c476793ee6ed7c1cba4.tar.bz2
nixlib-2af435b5cd74140bf8ee6c476793ee6ed7c1cba4.tar.lz
nixlib-2af435b5cd74140bf8ee6c476793ee6ed7c1cba4.tar.xz
nixlib-2af435b5cd74140bf8ee6c476793ee6ed7c1cba4.tar.zst
nixlib-2af435b5cd74140bf8ee6c476793ee6ed7c1cba4.zip
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>
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/blivet.nix12
1 files changed, 5 insertions, 7 deletions
diff --git a/nixos/tests/blivet.nix b/nixos/tests/blivet.nix
index acaf4fec614f..72c2a33f87eb 100644
--- a/nixos/tests/blivet.nix
+++ b/nixos/tests/blivet.nix
@@ -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 = ''