summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2016-06-16 02:05:18 +0200
committerMathieu Lirzin <mthl@gnu.org>2016-06-16 11:42:59 +0200
commit992b57dade927832a6c143cceac07ce30f8341ce (patch)
tree53837b578f5c16daea443e12215f8c470d4d1b5d /bin
parent6587ddea5a52f455953bd723a16c54976d371a8e (diff)
downloadcuirass-992b57dade927832a6c143cceac07ce30f8341ce.tar
cuirass-992b57dade927832a6c143cceac07ce30f8341ce.tar.gz
Support multiples <job-spec> evaluation.
Diffstat (limited to 'bin')
-rw-r--r--bin/cuirass.in29
1 files changed, 16 insertions, 13 deletions
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")))))))))