hydra: Fix the construction of system test jobs.

* build-aux/hydra/gnu-system.scm (system-test-jobs)[test->thunk]: New
procedure.
[->job]: Use it.
This commit is contained in:
Ludovic Courtès 2016-06-21 15:52:10 +02:00
parent 4c9243b688
commit ab23fb83c2
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -173,17 +173,29 @@ (define MiB
(define (system-test-jobs store system) (define (system-test-jobs store system)
"Return a list of jobs for the system tests." "Return a list of jobs for the system tests."
(define (->job test) (define (test->thunk test)
(let ((name (string->symbol (lambda ()
(string-append "test." (system-test-name test) (define drv
"." system))))
`(,name . ,(lambda ()
(run-with-store store (run-with-store store
(mbegin %store-monad (mbegin %store-monad
(set-current-system system) (set-current-system system)
(set-grafting #f) (set-grafting #f)
(set-guile-for-build (default-guile)) (set-guile-for-build (default-guile))
(system-test-value test))))))) (system-test-value test))))
`((derivation . ,(derivation-file-name drv))
(description . ,(format #f "GuixSD '~a' system test"
(system-test-name test)))
(long-description . ,(system-test-description test))
(license . ,gpl3+)
(home-page . ,%guix-home-page-url)
(maintainers . ("bug-guix@gnu.org")))))
(define (->job test)
(let ((name (string->symbol
(string-append "test." (system-test-name test)
"." system))))
(cons name (test->thunk test))))
(if (member system %guixsd-supported-systems) (if (member system %guixsd-supported-systems)
(map ->job (all-system-tests)) (map ->job (all-system-tests))