aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-11-07 13:49:51 +0100
committerLudovic Courtès <ludo@gnu.org>2018-11-07 15:28:05 +0100
commite50e1e5fdf6aca3bf964376469316813349660d6 (patch)
treee3de3aba04b96794cca453d6d24d6bc1cdc6ffdd
parentd4623d50edac4a6e81f5986a91c2818f5fc4965d (diff)
downloadcuirass-e50e1e5fdf6aca3bf964376469316813349660d6.tar
cuirass-e50e1e5fdf6aca3bf964376469316813349660d6.tar.gz
examples: random: Produce derivations that sometimes fail.
* examples/random-jobs.scm (random-derivation): Fail randomly.
-rw-r--r--examples/random-jobs.scm2
1 files changed, 2 insertions, 0 deletions
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))))))