mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-26 19:11:46 +02:00
services: Add etc-profile-d-service-type.
* gnu/services.scm (make-files->etc-directory) (files->profile-d-entries): New procedures. (etc-profile-d-service-type): New service type. * doc/guix.texi (Service Reference): Document it. * gnu/tests/base.scm (run-basic-test): Test it. Change-Id: I45dde43a1b9603c3384b933ebd1d6e45dba146b9
This commit is contained in:
+18
-1
@@ -170,6 +170,14 @@ grep --version
|
||||
info --version")
|
||||
marionette)))
|
||||
|
||||
(test-assert "/etc/profile.d is sourced"
|
||||
(zero? (marionette-eval '(system "
|
||||
. /etc/profile
|
||||
set -e -x
|
||||
test -f /etc/profile.d/test_profile_d.sh
|
||||
test \"$PROFILE_D_OK\" = yes")
|
||||
marionette)))
|
||||
|
||||
(test-equal "special files"
|
||||
'#$special-files
|
||||
(marionette-eval
|
||||
@@ -576,7 +584,16 @@ functionality tests, using the given KERNEL.")
|
||||
(let* ((os (marionette-operating-system
|
||||
(operating-system
|
||||
(inherit %simple-os)
|
||||
(kernel kernel))
|
||||
(kernel kernel)
|
||||
(services (cons (service
|
||||
etc-profile-d-service-type
|
||||
(list (plain-file
|
||||
"test_profile_d.sh"
|
||||
"export PROFILE_D_OK=yes\n")
|
||||
(plain-file
|
||||
"invalid-name"
|
||||
"not a POSIX script -- ignore me")))
|
||||
%base-services)))
|
||||
#:imported-modules '((gnu services herd)
|
||||
(guix combinators))))
|
||||
(vm (virtual-machine os)))
|
||||
|
||||
Reference in New Issue
Block a user