From 992b57dade927832a6c143cceac07ce30f8341ce Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Thu, 16 Jun 2016 02:05:18 +0200 Subject: Support multiples evaluation. --- bin/cuirass.in | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'bin') diff --git a/bin/cuirass.in b/bin/cuirass.in index e35655f..0da8c4e 100644 --- a/bin/cuirass.in +++ b/bin/cuirass.in @@ -105,22 +105,25 @@ DIR if required." (exit 0)) (else (let* ((specfile (option-ref opts 'file "tests/hello-subset.scm")) - (spec (primitive-load specfile)) + (specs (primitive-load specfile)) (args (option-ref opts '() #f)) (cachedir (if (null? args) (getenv "CUIRASS_CACHEDIR") (car args)))) (while #t - (fetch-repository cachedir spec) - (let ((store ((guix-variable 'store 'open-connection)))) - (dynamic-wind - (const #t) - (lambda () - (let* ((jobs (evaluate store cachedir spec)) - (set-build-options - (guix-variable 'store 'set-build-options))) - (set-build-options store #:use-substitutes? #f) - (build-packages store jobs))) - (lambda () - ((guix-variable 'store 'close-connection) store)))) + (for-each + (λ (spec) + (fetch-repository cachedir spec) + (let ((store ((guix-variable 'store 'open-connection)))) + (dynamic-wind + (const #t) + (lambda () + (let* ((jobs (evaluate store cachedir spec)) + (set-build-options + (guix-variable 'store 'set-build-options))) + (set-build-options store #:use-substitutes? #f) + (build-packages store jobs))) + (lambda () + ((guix-variable 'store 'close-connection) store))))) + specs) (sleep (string->number (option-ref opts 'interval "60"))))))))) -- cgit v1.2.3