summaryrefslogtreecommitdiff
path: root/build-aux/hydra/evaluate.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-06-27 09:30:01 +0200
committerLudovic Courtès <ludo@gnu.org>2016-06-27 09:30:01 +0200
commit01497dfe6c0a2ce69287d0fd0008747965a000df (patch)
treef7f6f53baf6e81a8bce26144c550da3bf4b9df5c /build-aux/hydra/evaluate.scm
parent74c8b174e8015de753ba5cab44f76f944e6fd4ba (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'build-aux/hydra/evaluate.scm')
-rw-r--r--build-aux/hydra/evaluate.scm15
1 files changed, 14 insertions, 1 deletions
diff --git a/build-aux/hydra/evaluate.scm b/build-aux/hydra/evaluate.scm
index afc7730ff2..ab10253f31 100644
--- a/build-aux/hydra/evaluate.scm
+++ b/build-aux/hydra/evaluate.scm
@@ -49,6 +49,17 @@ values."
(/ (time-nanosecond time) 1e9)))
(apply values results))))
+(define (assert-valid-job job thing)
+ "Raise an error if THING is not an alist with a valid 'derivation' entry.
+Otherwise return THING."
+ (unless (and (list? thing)
+ (and=> (assoc-ref thing 'derivation)
+ (lambda (value)
+ (and (string? value)
+ (string-suffix? ".drv" value)))))
+ (error "job did not produce a valid alist" job thing))
+ thing)
+
;; Without further ado...
(match (command-line)
@@ -83,7 +94,9 @@ values."
(map (lambda (job thunk)
(format (current-error-port) "evaluating '~a'... " job)
(force-output (current-error-port))
- (cons job (call-with-time-display thunk)))
+ (cons job
+ (assert-valid-job job
+ (call-with-time-display thunk))))
names thunks)))
port))))
((command _ ...)