Fixed Typed Scheme's optimizer's test harness to work with drdr.

original commit: 28acece484b050cd42f57c3826e47d92bde31aee
This commit is contained in:
Vincent St-Amour 2010-06-25 13:24:29 -04:00
parent e96760613b
commit db81a50276

View File

@ -1,4 +1,5 @@
#lang racket
(require racket/runtime-path)
;; since Typed Scheme's optimizer does source to source transformations,
;; we compare the expansion of automatically optimized and hand optimized
@ -20,13 +21,15 @@
(begin (printf "~a failed\n\n" name)
#f))))
(define-runtime-path here ".")
(let ((n-failures
(if (> (vector-length (current-command-line-arguments)) 0)
(if (test (format "generic/~a.rkt"
(vector-ref (current-command-line-arguments) 0)))
0 1)
(for/fold ((n-failures 0))
((gen (in-directory "generic")))
((gen (in-directory (build-path here "generic"))))
(+ n-failures (if (test gen) 0 1))))))
(unless (= n-failures 0)
(error (format "~a tests failed." n-failures))))