diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-07-12 00:38:50 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-07-12 22:47:08 +0200 |
commit | a91c3fc727ba90d8c9b91f67fb672da2e6b877ad (patch) | |
tree | 841e6b4b028c7e65dfed9538618347638d82ad4d /gnu/tests.scm | |
parent | fd129893982dcbda639429fc5b19c3715518ba40 (diff) |
services: <shepherd-service> no longer has an 'imported-modules' field.
* gnu/services/shepherd.scm (<shepherd-service>)[imported-modules]:
Remove.
(%default-imported-modules): Make private.
(shepherd-service-file): Use 'with-imported-modules'.
(shepherd-configuration-file): Remove 'modules' and the calls to
'imported-modules' and 'compiled-modules'. Use
'with-imported-modules' instead.
* doc/guix.texi (Shepherd Services): Adjust accordingly.
* gnu/services/base.scm (file-system-shepherd-service): Use
'with-imported-modules'. Remove 'imported-modules' field.
* gnu/system/mapped-devices.scm (device-mapping-service-type): Remove
'imported-modules'.
(open-luks-device): Use 'with-imported-modules'.
* gnu/tests.scm (marionette-shepherd-service): Remove 'imported-modules'
field and use 'with-imported-modules'.
Diffstat (limited to 'gnu/tests.scm')
-rw-r--r-- | gnu/tests.scm | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/gnu/tests.scm b/gnu/tests.scm index 1821ac45c5..8abe6c608b 100644 --- a/gnu/tests.scm +++ b/gnu/tests.scm @@ -80,68 +80,68 @@ (srfi srfi-9 gnu) (guix build syscalls) (rnrs bytevectors))) - (imported-modules `((guix build syscalls) - ,@imported-modules)) (start - #~(lambda () - (define (clear-echo termios) - (set-field termios (termios-local-flags) - (logand (lognot (local-flags ECHO)) - (termios-local-flags termios)))) - - (define (self-quoting? x) - (letrec-syntax ((one-of (syntax-rules () - ((_) #f) - ((_ pred rest ...) - (or (pred x) - (one-of rest ...)))))) - (one-of symbol? string? pair? null? vector? - bytevector? number? boolean?))) - - (match (primitive-fork) - (0 - (dynamic-wind - (const #t) - (lambda () - (let* ((repl (open-file #$device "r+0")) - (termios (tcgetattr (fileno repl))) - (console (open-file "/dev/console" "r+0"))) - ;; Don't echo input back. - (tcsetattr (fileno repl) (tcsetattr-action TCSANOW) - (clear-echo termios)) - - ;; Redirect output to the console. - (close-fdes 1) - (close-fdes 2) - (dup2 (fileno console) 1) - (dup2 (fileno console) 2) - (close-port console) - - (display 'ready repl) - (let loop () - (newline repl) - - (match (read repl) - ((? eof-object?) - (primitive-exit 0)) - (expr - (catch #t - (lambda () - (let ((result (primitive-eval expr))) - (write (if (self-quoting? result) - result - (object->string result)) - repl))) - (lambda (key . args) - (print-exception (current-error-port) - (stack-ref (make-stack #t) 1) - key args) - (write #f repl))))) - (loop)))) - (lambda () - (primitive-exit 1)))) - (pid - pid)))) + (with-imported-modules `((guix build syscalls) + ,@imported-modules) + #~(lambda () + (define (clear-echo termios) + (set-field termios (termios-local-flags) + (logand (lognot (local-flags ECHO)) + (termios-local-flags termios)))) + + (define (self-quoting? x) + (letrec-syntax ((one-of (syntax-rules () + ((_) #f) + ((_ pred rest ...) + (or (pred x) + (one-of rest ...)))))) + (one-of symbol? string? pair? null? vector? + bytevector? number? boolean?))) + + (match (primitive-fork) + (0 + (dynamic-wind + (const #t) + (lambda () + (let* ((repl (open-file #$device "r+0")) + (termios (tcgetattr (fileno repl))) + (console (open-file "/dev/console" "r+0"))) + ;; Don't echo input back. + (tcsetattr (fileno repl) (tcsetattr-action TCSANOW) + (clear-echo termios)) + + ;; Redirect output to the console. + (close-fdes 1) + (close-fdes 2) + (dup2 (fileno console) 1) + (dup2 (fileno console) 2) + (close-port console) + + (display 'ready repl) + (let loop () + (newline repl) + + (match (read repl) + ((? eof-object?) + (primitive-exit 0)) + (expr + (catch #t + (lambda () + (let ((result (primitive-eval expr))) + (write (if (self-quoting? result) + result + (object->string result)) + repl))) + (lambda (key . args) + (print-exception (current-error-port) + (stack-ref (make-stack #t) 1) + key args) + (write #f repl))))) + (loop)))) + (lambda () + (primitive-exit 1)))) + (pid + pid))))) (stop #~(make-kill-destructor))))))) (define marionette-service-type |