~ruther/ruthless-guix

ref: 975dc9d88522274c43fb71adbf50fe98966326a6 ruthless-guix/modules/ruther/tests.scm -rw-r--r-- 1003 bytes
975dc9d8 — Rutherther feat: add my custom bootloaders 3 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
(define-module (ruther tests)
  #:use-module (gnu tests)
  #:use-module (guix discovery)
  #:use-module (guix ui)
  #:export (ruther-test-modules
            fold-ruther-system-tests
            ruther-system-tests))

(define (ruther-test-modules)
  "Return the list of modules that define system tests."
  (scheme-modules (dirname (search-path %load-path "ruther.scm"))
                  "ruther/tests"
                  #:warn warn-about-load-error))

(define (fold-ruther-system-tests proc seed)
  "Invoke PROC on each system test, passing it the test and the previous
result."
  (fold-module-public-variables (lambda (obj result)
                                  (if (system-test? obj)
                                      (cons obj result)
                                      result))
                                '()
                                (ruther-test-modules)))

(define (ruther-system-tests)
  "Return the list of system tests."
  (reverse (fold-ruther-system-tests cons '())))