(directory-pathname (current-load-pathname))
(lambda ()
(load "load")
- (for-each (lambda (entry)
- (receive (pathname environment)
- (if (pair? entry)
- (values (car entry) (->environment (cadr entry)))
- (values entry #!default))
- (with-notification
- (lambda (output-port)
- (write-string "Running tests in " output-port)
- (write pathname output-port)
- (if (not (default-object? environment))
- (begin
- (write-string " in environment " output-port)
- (write (cond ((environment->package environment)
- => package/name)
- (else environment))
- output-port))))
- (lambda ()
- (if (not (pathname-type pathname))
- (with-working-directory-pathname
- (directory-pathname pathname)
- (lambda ()
- ;++ Kludge around a bug in SF...
- (compile-file (file-pathname pathname)
- '()
- environment))))
- (let* ((t (pathname-type pathname))
- (p (if (and t (string=? "com" t)
- (eq? 'C
- microcode-id/compiled-code-type))
- (pathname-new-type pathname "so")
- pathname)))
- (run-unit-tests p environment))))))
- known-tests)))
\ No newline at end of file
+ (let ((results
+ (map (lambda (entry)
+ (receive (pathname environment)
+ (if (pair? entry)
+ (values (car entry) (->environment (cadr entry)))
+ (values entry #!default))
+ (with-notification
+ (lambda (output-port)
+ (write-string "Running tests in " output-port)
+ (write pathname output-port)
+ (if (not (default-object? environment))
+ (begin
+ (write-string " in environment " output-port)
+ (write (cond ((environment->package environment)
+ => package/name)
+ (else environment))
+ output-port))))
+ (lambda ()
+ (if (not (pathname-type pathname))
+ (with-working-directory-pathname
+ (directory-pathname pathname)
+ (lambda ()
+ ;++ Kludge around a bug in SF...
+ (compile-file (file-pathname pathname)
+ '()
+ environment))))
+ (let* ((t (pathname-type pathname))
+ (p (if (and t (string=? "com" t)
+ (eq? 'C
+ microcode-id/compiled-code-type))
+ (pathname-new-type pathname "so")
+ pathname)))
+ (cons pathname
+ (run-unit-tests p environment)))))))
+ known-tests)))
+
+ (define (show-results results)
+ (for-each (lambda (p)
+ (write-string (if (cdr p) "PASSED" "FAILED"))
+ (write-string ": ")
+ (write (car p))
+ (newline))
+ results))
+
+ (fresh-line)
+ (newline)
+ (write-string "Test results:")
+ (newline)
+ (show-results (filter cdr results))
+ (show-results (remove cdr results)))))
\ No newline at end of file