branch: master
commit e50e1e5fdf6aca3bf964376469316813349660d6
Author: Ludovic Courtès <[email protected]>
Date:   Wed Nov 7 13:49:51 2018 +0100

    examples: random: Produce derivations that sometimes fail.
    
    * examples/random-jobs.scm (random-derivation): Fail randomly.
---
 examples/random-jobs.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/examples/random-jobs.scm b/examples/random-jobs.scm
index 6521734..d623b25 100644
--- a/examples/random-jobs.scm
+++ b/examples/random-jobs.scm
@@ -39,6 +39,8 @@
                                                 (cdr (gettimeofday))))
                                  (state (seed->random-state seed)))
                             (sleep (pk 'sleeping (random 10 state)))
+                            (when (zero? (random 4 state))
+                              (error "we're faillliiiiing!"))
                             #$nonce
                             (mkdir #$output))))))
 

Reply via email to