aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/web.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services/web.scm')
0 files changed, 0 insertions, 0 deletions
line) (string-take line (or (string-index line separators) 0))) lines)) (status (close-pipe port))) (and (= status 0) (and-map (lambda (module) (member module modules string=?)) '#$modules)))))) (define* (run-loadable-kernel-modules-test-base base-os module-names) "Run a test of BASE-OS, verifying that MODULE-NAMES are loaded in memory." (define os (marionette-operating-system base-os #:imported-modules '((guix combinators)))) (define vm (virtual-machine os)) (define (test script) (with-imported-modules '((gnu build marionette)) #~(begin (use-modules (gnu build marionette) (srfi srfi-64)) (define marionette (make-marionette (list #$vm))) (test-runner-current (system-test-runner #$output)) (test-begin "loadable-kernel-modules") (test-assert "script successfully evaluated" (marionette-eval '(primitive-load #$script) marionette)) (test-end)))) (gexp->derivation "loadable-kernel-modules" (test (modules-loaded?-program os module-names)))) (define* (run-loadable-kernel-modules-test module-packages module-names) "Run a test of an OS having MODULE-PACKAGES, and verify that MODULE-NAMES are loaded in memory." (run-loadable-kernel-modules-test-base (operating-system (inherit (simple-operating-system)) (services (cons (service kernel-module-loader-service-type module-names) (operating-system-user-services (simple-operating-system)))) (kernel-loadable-modules module-packages)) module-names)) (define* (run-loadable-kernel-modules-service-test module-packages module-names) "Run a test of an OS having MODULE-PACKAGES, which are loaded by creating a service that extends LINUXL-LOADABLE-MODULE-SERVICE-TYPE. Then verify that MODULE-NAMES are loaded in memory." (run-loadable-kernel-modules-test-base (operating-system (inherit (simple-operating-system)) (services (cons* (simple-service 'installing-module linux-loadable-module-service-type module-packages) (service kernel-module-loader-service-type module-names) (operating-system-user-services (simple-operating-system))))) module-names)) (define %test-loadable-kernel-modules-0 (system-test (name "loadable-kernel-modules-0") (description "Tests loadable kernel modules facility of <operating-system> with no extra modules.") (value (run-loadable-kernel-modules-test '() '())))) (define %test-loadable-kernel-modules-1 (system-test (name "loadable-kernel-modules-1") (description "Tests loadable kernel modules facility of <operating-system> with one extra module.") (value (run-loadable-kernel-modules-test (list ddcci-driver-linux) '("ddcci"))))) (define %test-loadable-kernel-modules-2 (system-test (name "loadable-kernel-modules-2") (description "Tests loadable kernel modules facility of <operating-system> with two extra modules.") (value (run-loadable-kernel-modules-test (list acpi-call-linux-module (package (inherit ddcci-driver-linux) (arguments `(#:linux #f ,@(strip-keyword-arguments '(#:linux) (package-arguments ddcci-driver-linux)))))) '("acpi_call" "ddcci"))))) (define %test-loadable-kernel-modules-service-0 (system-test (name "loadable-kernel-modules-service-0") (description "Tests loadable kernel modules extensible service with no extra modules.") (value (run-loadable-kernel-modules-service-test '() '())))) (define %test-loadable-kernel-modules-service-1 (system-test (name "loadable-kernel-modules-service-1") (description "Tests loadable kernel modules extensible service with one extra module.") (value (run-loadable-kernel-modules-service-test (list ddcci-driver-linux) '("ddcci"))))) (define %test-loadable-kernel-modules-service-2 (system-test (name "loadable-kernel-modules-service-2") (description "Tests loadable kernel modules extensible service with two extra modules.") (value (run-loadable-kernel-modules-service-test (list acpi-call-linux-module (package (inherit ddcci-driver-linux) (arguments `(#:linux #f ,@(strip-keyword-arguments '(#:linux) (package-arguments ddcci-driver-linux)))))) '("acpi_call" "ddcci")))))