aboutsummaryrefslogtreecommitdiff
path: root/gnu/tests/base.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-02-08 15:32:28 +0100
committerLudovic Courtès <ludo@gnu.org>2017-02-08 16:17:05 +0100
commit387e175492f960d7d86f34f3b2e43938fa72dbf3 (patch)
treea12082201befe64989049c1c417752195f0381be /gnu/tests/base.scm
parent618739b063dd0f8f33d0618cf64567aaaf86f4d7 (diff)
downloadpatches-387e175492f960d7d86f34f3b2e43938fa72dbf3.tar
patches-387e175492f960d7d86f34f3b2e43938fa72dbf3.tar.gz
services: Add 'special-files-service-type'.
* gnu/build/activation.scm (activate-/bin/sh): Remove. (activate-special-files): New procedure. * gnu/services.scm (activation-script): Remove call to 'activate-/bin/sh'. (special-files-service-type): New variable. (extra-special-file): New procedure. * gnu/services/base.scm (%base-services): Add SPECIAL-FILES-SERVICE-TYPE instance. * gnu/tests/base.scm (run-basic-test)[special-files]: New variables. ["special files"]: New test.
Diffstat (limited to 'gnu/tests/base.scm')
-rw-r--r--gnu/tests/base.scm17
1 files changed, 17 insertions, 0 deletions
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index 8a6a7a1568..000a4ddecb 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -77,6 +77,11 @@ When INITIALIZATION is true, it must be a one-argument procedure that is
passed a gexp denoting the marionette, and it must return gexp that is
inserted before the first test. This is used to introduce an extra
initialization step, such as entering a LUKS passphrase."
+ (define special-files
+ (service-parameters
+ (fold-services (operating-system-services os)
+ #:target-type special-files-service-type)))
+
(define test
(with-imported-modules '((gnu build marionette)
(guix build syscalls))
@@ -120,6 +125,18 @@ grep --version
info --version")
marionette)))
+ (test-equal "special files"
+ '#$special-files
+ (marionette-eval
+ '(begin
+ (use-modules (ice-9 match))
+
+ (map (match-lambda
+ ((file target)
+ (list file (readlink file))))
+ '#$special-files))
+ marionette))
+
(test-assert "accounts"
(let ((users (marionette-eval '(begin
(use-modules (ice-9 match))