~ruther/ruthless-guix

ref: 48d5aa987b04e557228301145b7749f1316b4765 ruthless-guix/modules/ruther/tests.scm -rw-r--r-- 1003 bytes
48d5aa98 — Rutherther chore: bump claude code 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 '())))