gnu: julia-pdmats: Update to 0.11.1.
[jackhill/guix/guix.git] / tests / guix-daemon.sh
index 78f82ea..330ad68 100644 (file)
@@ -94,6 +94,27 @@ done
 
 kill "$daemon_pid"
 
+# Make sure 'profiles/per-user' is created when connecting over TCP.
+
+orig_GUIX_STATE_DIRECTORY="$GUIX_STATE_DIRECTORY"
+GUIX_STATE_DIRECTORY="$GUIX_STATE_DIRECTORY-2"
+
+guix-daemon --disable-chroot --listen="localhost:9877" &
+daemon_pid=$!
+
+GUIX_DAEMON_SOCKET="guix://localhost:9877"
+export GUIX_DAEMON_SOCKET
+
+test ! -d "$GUIX_STATE_DIRECTORY/profiles/per-user"
+
+guix build guile-bootstrap -d
+
+test -d "$GUIX_STATE_DIRECTORY/profiles/per-user/$USER"
+
+kill "$daemon_pid"
+unset GUIX_DAEMON_SOCKET
+GUIX_STATE_DIRECTORY="$orig_GUIX_STATE_DIRECTORY"
+
 # Check the failed build cache.
 
 guix-daemon --no-substitutes --listen="$socket" --disable-chroot       \
@@ -141,7 +162,7 @@ daemon_pid=$!
 
 GUIX_DAEMON_SOCKET="$socket" \
 guile -c '
-  (use-modules (guix) (gnu packages) (guix tests))
+  (use-modules (guix) (guix tests))
 
   (with-store store
     (let* ((build  (add-text-to-store store "build.sh"
@@ -165,7 +186,7 @@ kill "$daemon_pid"
 # honored.
 
 client_code='
-  (use-modules (guix) (gnu packages) (guix tests) (srfi srfi-34))
+  (use-modules (guix) (guix tests) (srfi srfi-34))
 
   (with-store store
     (let* ((build  (add-text-to-store store "build.sh"
@@ -203,7 +224,7 @@ daemon_pid=$!
 GUIX_DAEMON_SOCKET="guix://$tcp_socket"
 export GUIX_DAEMON_SOCKET
 
-if guix gc; then false; else true; fi
+! guix gc
 
 unset GUIX_DAEMON_SOCKET
 kill "$daemon_pid"