Skip to content
Snippets Groups Projects
Commit 38d367d7 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

evaluate: Really pass arguments like Hydra.

* bin/evaluate.in (main): Use SPEC's #:name as a key in ARGS.
* examples/random-jobs.scm (make-random-jobs): Adjust accordingly.
parent 074b9d02
No related branches found
No related tags found
No related merge requests found
......@@ -70,11 +70,13 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(let* ((proc-name (assq-ref spec #:proc))
(proc (module-ref %user-module proc-name))
(commit (assq-ref spec #:current-commit))
(args `((revision . ,commit)
(file-name . ,source)
(name (assq-ref spec #:name))
(args `((,(string->symbol name)
(revision . ,commit)
(file-name . ,source))
,@(or (assq-ref spec #:arguments) '())))
(thunks (proc store args))
(eval `((#:specification . ,(assq-ref spec #:name))
(eval `((#:specification . ,name)
(#:revision . ,commit))))
(pretty-print
`(evaluation ,eval
......
......@@ -42,10 +42,12 @@
(mkdir #$output))))))
(define (make-random-jobs store arguments)
(format (current-error-port)
"evaluating random jobs from directory ~s, commit ~s~%"
(assq-ref arguments 'file-name)
(assq-ref arguments 'revision))
(let ((random (assq-ref arguments 'random)))
(format (current-error-port)
"evaluating random jobs from directory ~s, commit ~s~%"
(assq-ref random 'file-name)
(assq-ref random 'revision)))
(unfold (cut > <> 10)
(lambda (i)
(let ((suffix (number->string i)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment