diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-10-18 18:10:47 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-10-18 18:10:47 +0200 |
commit | b95d1b3289a6bb8e346a47e750660e16fb201c57 (patch) | |
tree | cd4d956436f21d77645fd795d3e9737e4892c1d3 /tests | |
parent | a1d1703a1dc6bfcd10f48fe707ee7ac65300a37d (diff) | |
parent | dabcfc6de29032ea52d1cb54163a783f7e480167 (diff) |
Merge branch 'master' into staging
Diffstat (limited to 'tests')
-rw-r--r-- | tests/containers.scm | 1 | ||||
-rw-r--r-- | tests/guix-daemon.sh | 21 | ||||
-rw-r--r-- | tests/store.scm | 13 |
3 files changed, 34 insertions, 1 deletions
diff --git a/tests/containers.scm b/tests/containers.scm index 01fbcbb45a..7b63e5c108 100644 --- a/tests/containers.scm +++ b/tests/containers.scm @@ -269,6 +269,7 @@ (lset= string=? (cons* "." ".." (map basename reqs)) (pk (call-with-input-file result read)))))))))) +(skip-if-unsupported) (test-assert "eval/container, non-empty load path" (call-with-temporary-directory (lambda (directory) diff --git a/tests/guix-daemon.sh b/tests/guix-daemon.sh index 758f18cc36..b58500966b 100644 --- a/tests/guix-daemon.sh +++ b/tests/guix-daemon.sh @@ -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 \ diff --git a/tests/store.scm b/tests/store.scm index 518750d26a..2b14a4af0a 100644 --- a/tests/store.scm +++ b/tests/store.scm @@ -18,6 +18,7 @@ (define-module (test-store) #:use-module (guix tests) + #:use-module (guix config) #:use-module (guix store) #:use-module (guix utils) #:use-module (guix monads) @@ -102,7 +103,17 @@ "/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7/bin/guile"))) (not (direct-store-path? (%store-prefix))))) -(test-skip (if %store 0 13)) +(test-skip (if %store 0 15)) + +(test-equal "profiles/per-user exists and is not writable" + #o755 + (stat:perms (stat (string-append %state-directory "/profiles/per-user")))) + +(test-equal "profiles/per-user/$USER exists" + (list (getuid) #o755) + (let ((s (stat (string-append %state-directory "/profiles/per-user/" + (passwd:name (getpwuid (getuid))))))) + (list (stat:uid s) (stat:perms s)))) (test-equal "add-data-to-store" #vu8(1 2 3 4 5) |