Better error reporting by the optimizer's test harness.
This commit is contained in:
parent
7fb1b41a28
commit
566aeedb59
|
@ -28,23 +28,25 @@
|
||||||
(or (regexp-match ".*~" name) ; we ignore backup files
|
(or (regexp-match ".*~" name) ; we ignore backup files
|
||||||
;; machine optimized and hand optimized versions must expand to the
|
;; machine optimized and hand optimized versions must expand to the
|
||||||
;; same code
|
;; same code
|
||||||
(and (equal? (parameterize ([current-load-relative-directory
|
(and (or (equal? (parameterize ([current-load-relative-directory
|
||||||
(build-path here "generic")])
|
(build-path here "generic")])
|
||||||
(read-and-expand gen))
|
(read-and-expand gen))
|
||||||
(let ((hand-opt-dir (build-path here "hand-optimized")))
|
(let ((hand-opt-dir (build-path here "hand-optimized")))
|
||||||
(parameterize ([current-load-relative-directory hand-opt-dir])
|
(parameterize ([current-load-relative-directory hand-opt-dir])
|
||||||
(read-and-expand (build-path hand-opt-dir name)))))
|
(read-and-expand (build-path hand-opt-dir name)))))
|
||||||
|
(begin (printf "~a failed: expanded code mismatch\n\n" name)
|
||||||
|
#f))
|
||||||
;; optimized and non-optimized versions must evaluate to the
|
;; optimized and non-optimized versions must evaluate to the
|
||||||
;; same thing
|
;; same thing
|
||||||
(equal? (with-output-to-string
|
(or (equal? (with-output-to-string
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(dynamic-require gen #f)))
|
(dynamic-require gen #f)))
|
||||||
(with-output-to-string
|
(with-output-to-string
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let ((non-opt-dir (build-path here "non-optimized")))
|
(let ((non-opt-dir (build-path here "non-optimized")))
|
||||||
(dynamic-require (build-path non-opt-dir name) #f))))))
|
(dynamic-require (build-path non-opt-dir name) #f)))))
|
||||||
(begin (printf "~a failed\n\n" name)
|
(begin (printf "~a failed: result mismatch\n\n" name)
|
||||||
#f))))
|
#f))))))
|
||||||
|
|
||||||
(define-runtime-path here ".")
|
(define-runtime-path here ".")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user