summaryrefslogtreecommitdiff
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
parent6587ddea5a52f455953bd723a16c54976d371a8e (diff)
downloadcuirass-992b57dade927832a6c143cceac07ce30f8341ce.tar
cuirass-992b57dade927832a6c143cceac07ce30f8341ce.tar.gz
Support multiples <job-spec> evaluation.
-rw-r--r--bin/cuirass.in29
-rw-r--r--tests/hello-subset.scm21
2 files changed, 30 insertions, 20 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")))))))))
diff --git a/tests/hello-subset.scm b/tests/hello-subset.scm
index 3330142..7139d95 100644
--- a/tests/hello-subset.scm
+++ b/tests/hello-subset.scm
@@ -24,10 +24,17 @@
(define (local-file file)
(string-append (dirname (current-filename)) "/" file))
-(make-job-spec
- #:name "guix"
- #:url "git://git.savannah.gnu.org/guix.git"
- #:branch "master"
- #:file (local-file "gnu-system.scm")
- #:proc 'hydra-jobs
- #:arguments '((subset . "hello")))
+(list (make-job-spec
+ #:name "guix"
+ #:url "git://git.savannah.gnu.org/guix.git"
+ #:branch "master"
+ #:file (local-file "gnu-system.scm")
+ #:proc 'hydra-jobs
+ #:arguments '((subset . "hello")))
+ (make-job-spec
+ #:name "guix"
+ #:url "git://git.savannah.gnu.org/guix.git"
+ #:branch "core-updates"
+ #:file (local-file "gnu-system.scm")
+ #:proc 'hydra-jobs
+ #:arguments '((subset . "hello"))))