aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/django.scm
diff options
context:
space:
mode:
authorgemmaro <gemmaro.dev@gmail.com>2023-05-26 23:51:28 +0900
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2023-07-01 10:54:53 +0200
commitd3eebaf71dda8c1828aeb90596fa06d97eed67cc (patch)
tree68a1fb0f61456d04837c0b6261879f8665f87ce3 /gnu/packages/django.scm
parent9c0d8c44ba1aecb46e9a13604bf1bb8c1058d625 (diff)
downloadguix-d3eebaf71dda8c1828aeb90596fa06d97eed67cc.tar.gz
guix-d3eebaf71dda8c1828aeb90596fa06d97eed67cc.zip
gnu: Add font-intel-one-mono
* gnu/packages/fonts.scm (font-intel-one-mono): New variable. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Diffstat (limited to 'gnu/packages/django.scm')
0 files changed, 0 insertions, 0 deletions
marionette))) (test-end)))) (gexp->derivation "switch-to-system" (test (switch-system-program os)))) (define* (run-upgrade-services-test) "Run a test of an OS running UPGRADE-SERVICES-PROGRAM, which upgrades the Shepherd (PID 1) by unloading obsolete services and loading new services." (define os (marionette-operating-system (simple-operating-system) #:imported-modules '((gnu services herd) (guix combinators)))) (define vm (virtual-machine os)) (define dummy-service ;; Shepherd service that does nothing, for the sole purpose of ensuring ;; that it is properly installed and started by the script. (shepherd-service (provision '(dummy)) (start #~(const #t)) (stop #~(const #t)) (respawn? #f))) (define (test enable-dummy disable-dummy) (with-imported-modules '((gnu build marionette)) #~(begin (use-modules (gnu build marionette) (srfi srfi-64)) (define marionette (make-marionette (list #$vm))) ;; Return the names of the running services on MARIONETTE. (define (running-services marionette) (marionette-eval '(begin (use-modules (gnu services herd)) (map live-service-canonical-name (current-services))) marionette)) (test-runner-current (system-test-runner #$output)) (test-begin "upgrade-services") (let ((services-prior (running-services marionette))) (test-assert "script successfully evaluated" (marionette-eval '(primitive-load #$enable-dummy) marionette)) (test-assert "script started new service" (and (not (memq 'dummy services-prior)) (memq 'dummy (running-services marionette)))) (test-assert "script successfully evaluated" (marionette-eval '(primitive-load #$disable-dummy) marionette)) (test-assert "script stopped obsolete service" (not (memq 'dummy (running-services marionette))))) (test-end)))) (gexp->derivation "upgrade-services" (let* ((file (shepherd-service-file dummy-service)) (enable (upgrade-services-program (list file) '(dummy) '() '())) (disable (upgrade-services-program '() '() '(dummy) '()))) (test enable disable)))) (define* (run-install-bootloader-test) "Run a test of an OS running INSTALL-BOOTLOADER-PROGRAM, which installs a bootloader's configuration file." (define os (marionette-operating-system (simple-operating-system) #:imported-modules '((gnu services herd) (guix combinators)))) (define vm (virtual-machine (operating-system os) (volatile? #f))) (define (test script) (with-imported-modules '((gnu build marionette)) #~(begin (use-modules (gnu build marionette) (ice-9 regex) (srfi srfi-1) (srfi srfi-64)) (define marionette (make-marionette (list #$vm))) ;; Return the system generation paths that have GRUB menu entries. (define (generations-in-grub-cfg marionette) (let ((grub-cfg (marionette-eval '(begin (use-modules (rnrs io ports)) (call-with-input-file "/boot/grub/grub.cfg" get-string-all)) marionette))) (map (lambda (parameter) (second (string-split (match:substring parameter) #\=))) (list-matches "system=[^ ]*" grub-cfg)))) (test-runner-current (system-test-runner #$output)) (test-begin "install-bootloader") (test-assert "no prior menu entry for system generation" (not (member #$os (generations-in-grub-cfg marionette)))) (test-assert "script successfully evaluated" (marionette-eval '(primitive-load #$script) marionette)) (test-assert "menu entry created for system generation" (member #$os (generations-in-grub-cfg marionette))) (test-end)))) (let* ((bootloader ((compose bootloader-configuration-bootloader operating-system-bootloader) os)) ;; The typical use-case for 'install-bootloader-program' is to read ;; the boot parameters for the existing menu entries on the system, ;; parse them with 'boot-parameters->menu-entry', and pass the ;; results to 'operating-system-bootcfg'. However, to obtain boot ;; parameters, we would need to start the marionette, which we should ;; ideally avoid doing outside of the 'test' G-Expression. Thus, we ;; generate a bootloader configuration for the script as if there ;; were no existing menu entries. In the grand scheme of things, this ;; matters little -- these tests should not make assertions about the ;; behavior of 'operating-system-bootcfg'. (bootcfg (operating-system-bootcfg os '())) (bootcfg-file (bootloader-configuration-file bootloader))) (gexp->derivation "install-bootloader" ;; Due to the read-only nature of the virtual machines used in the system ;; test suite, the bootloader installer script is omitted. 'grub-install' ;; would attempt to write directly to the virtual disk if the ;; installation script were run. (test (install-bootloader-program #f #f #f bootcfg bootcfg-file '(#f) "/"))))) (define %test-switch-to-system (system-test (name "switch-to-system") (description "Create a new generation of the system profile.") (value (run-switch-to-system-test)))) (define %test-upgrade-services (system-test (name "upgrade-services") (description "Upgrade the Shepherd by unloading obsolete services and loading new services.") (value (run-upgrade-services-test)))) (define %test-install-bootloader (system-test (name "install-bootloader") (description "Install a bootloader and its configuration file.") (value (run-install-bootloader-test))))