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
|
;; read-syntax: cannot load snip-class reader
|
||||||
|
|
||||||
(require "../parse-bytecode.rkt"
|
(require "../parse-bytecode.rkt"
|
||||||
|
racket/list
|
||||||
racket/path)
|
racket/path)
|
||||||
|
|
||||||
(define collects-dir
|
(define collects-dir
|
||||||
|
@ -19,12 +20,19 @@
|
||||||
[else
|
[else
|
||||||
p]))))
|
p]))))
|
||||||
|
|
||||||
|
(define failures '())
|
||||||
|
|
||||||
(for ([path (in-directory collects-dir)])
|
(for ([path (in-directory collects-dir)])
|
||||||
(when (regexp-match? #rx"[.]rkt$" path)
|
(when (regexp-match? #rx"[.]rkt$" path)
|
||||||
(printf "parsing file: ~a... " path)
|
(printf "parsing file: ~a... " path)
|
||||||
(flush-output)
|
(flush-output)
|
||||||
(let ([start-time (current-inexact-milliseconds)])
|
(let ([start-time (current-inexact-milliseconds)])
|
||||||
|
(with-handlers ((exn:fail? (lambda (exn)
|
||||||
|
(set! failures (cons path failures))
|
||||||
|
(printf "FAILED! ~a" (exn-message exn)))))
|
||||||
(void (parse-bytecode path))
|
(void (parse-bytecode path))
|
||||||
(let ([end-time (current-inexact-milliseconds)])
|
(let ([end-time (current-inexact-milliseconds)])
|
||||||
(printf "~a msecs\n" (inexact->exact (floor (- end-time start-time))))))))
|
(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