Flush output in fuzz testing.

This commit is contained in:
Sam Tobin-Hochstadt 2010-10-21 23:32:43 -07:00
parent 34e940a8b5
commit dcd3f9a9aa
2 changed files with 3 additions and 2 deletions

View File

@ -1894,7 +1894,7 @@ path/s is either such a string or a list of them.
"collects/tests/stepper/universe-test.rkt" drdr:command-line (mzc *)
"collects/tests/stepper/world-test.rktl" drdr:command-line #f
"collects/tests/stepper/write-display.rktl" drdr:command-line #f
"collects/tests/stress/fuzz.rkt" responsible (samth mflatt) drdr:command-line (racket "-t" * "--" "-c")
"collects/tests/stress/fuzz.rkt" responsible (samth mflatt) drdr:command-line (racket "-t" * "--" "-c") drdr:random #t
"collects/tests/stress.rkt" responsible (jay)
"collects/tests/stxparse" responsible (ryanc)
"collects/tests/stxparse/stxclass.rkt" drdr:command-line (gracket-text "-t" *)

View File

@ -22,10 +22,11 @@
(define (run fname [seed (or sd (+ 1 (random (expt 2 30))))])
(printf "DrDr Ignore! random-seed ~s\n" seed)
(printf "name: ~a\n" fname)
(flush-output)
(random-seed seed)
(define bs (file->bytes fname))
(define len (* 8 (bytes-length bs)))
(printf "name: ~a\n" fname)
(for ([i (in-range (quotient len 10000))])
(flip-file bs (random len)))
(with-handlers ([void void])