mirror of
git://git.savannah.gnu.org/guix/guix-cuirass.git
synced 2024-12-29 11:40:16 +01:00
examples: random: Create jobs with non-job dependencies.
* examples/random-manifest.scm <top level>: Add dependency on non-job derivation.
This commit is contained in:
parent
c326f6ccbb
commit
fccb8694e6
1 changed files with 11 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
;;; random-manifest.scm -- Return a manifest of random entries.
|
||||
;;; Copyright © 2018, 2023 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2018, 2023-2024 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
|
||||
;;;
|
||||
;;; This file is part of Cuirass.
|
||||
|
@ -80,10 +80,16 @@
|
|||
(if (>= i 20)
|
||||
(reverse lst)
|
||||
(let* ((multiple-outputs? (zero? (modulo i 5)))
|
||||
(dependency (and (= 0 (modulo i 3))
|
||||
(> i 0)
|
||||
(list-ref lst
|
||||
(random (length lst) %state))))
|
||||
(dependency (cond ((and (zero? (modulo i 3))
|
||||
(> i 0))
|
||||
(list-ref lst
|
||||
(random (length lst) %state)))
|
||||
((zero? (modulo i 4))
|
||||
(make-job
|
||||
"entropy"
|
||||
(random-computed-file
|
||||
"entropy-derivation-without-a-job")))
|
||||
(else #f)))
|
||||
(suffix (string-append
|
||||
(if multiple-outputs?
|
||||
"multiple-outputs"
|
||||
|
|
Loading…
Reference in a new issue