adjusted the exercising of parsing to let me know what files fail
This commit is contained in:
parent
3a6f525c32
commit
87d1149c75
|
@ -7,6 +7,7 @@
|
|||
;; read-syntax: cannot load snip-class reader
|
||||
|
||||
(require "../parse-bytecode.rkt"
|
||||
racket/list
|
||||
racket/path)
|
||||
|
||||
(define collects-dir
|
||||
|
@ -19,12 +20,19 @@
|
|||
[else
|
||||
p]))))
|
||||
|
||||
(define failures '())
|
||||
|
||||
(for ([path (in-directory collects-dir)])
|
||||
(when (regexp-match? #rx"[.]rkt$" path)
|
||||
(printf "parsing file: ~a... " path)
|
||||
(flush-output)
|
||||
(let ([start-time (current-inexact-milliseconds)])
|
||||
(void (parse-bytecode path))
|
||||
(let ([end-time (current-inexact-milliseconds)])
|
||||
(printf "~a msecs\n" (inexact->exact (floor (- end-time start-time))))))))
|
||||
(with-handlers ((exn:fail? (lambda (exn)
|
||||
(set! failures (cons path failures))
|
||||
(printf "FAILED! ~a" (exn-message exn)))))
|
||||
(void (parse-bytecode path))
|
||||
(let ([end-time (current-inexact-milliseconds)])
|
||||
(printf "~a msecs\n" (inexact->exact (floor (- end-time start-time)))))))))
|
||||
|
||||
(unless (empty? failures)
|
||||
(printf "Failed on: ~s" failures))
|
Loading…
Reference in New Issue
Block a user