doit.lsp 3.47 KB
Newer Older
1 2 3 4 5 6
;;; Uncomment the next line to make MAKE-STRING and MAKE-SEQUENCE
;;; tests require that a missing :initial-element argument defaults
;;; to a single value, rather than leaving the string/sequence filled
;;; with arbitrary legal garbage.
;; (pushnew :ansi-tests-strict-initial-element *features*)

7
#+allegro (setq *enclose-printer-errors* nil)
8

9 10 11 12 13
(let ((wd (or *compile-file-pathname* *load-pathname*)))
  (when wd
    (setf *default-pathname-defaults*
          (make-pathname :name nil :type nil :version nil :defaults wd))))

14 15 16 17
;;; Remove compiled files
(let* ((fn (compile-file-pathname "doit.lsp"))
       (type (pathname-type fn))
       (dir-pathname (make-pathname :name :wild :type type))
18 19
       (subdir-pathname (make-pathname :directory '(:relative :wild)
                                       :name :wild :type type))
20
       (format-pathname (make-pathname :directory '(:relative "printer" "format")
21 22 23 24
                                       :name :wild :type type))
       (files (append (directory dir-pathname)
                      (directory subdir-pathname)
                      (directory format-pathname))))
25 26 27
  (assert type)
  (assert (not (string-equal type "lsp")))
  (mapc #'delete-file files))
28 29 30 31 32 33 34 35 36 37 38 39

(load "gclload1.lsp")
(load "gclload2.lsp")

#+allegro
(progn
  (rt:disable-note :nil-vectors-are-strings)
  (rt:disable-note :standardized-package-nicknames)
  (rt:disable-note :type-of/strict-builtins)
  (rt:disable-note :assume-no-simple-streams)
  (rt:disable-note :assume-no-gray-streams))

40 41 42 43 44
#+lispworks
(progn
  (rtest:disable-note :allow-nil-arrays)
  (rtest:disable-note :nil-vectors-are-strings))

sds's avatar
sds committed
45 46
#+cmu
(progn
47 48
  (setf ext:*ignore-extra-right-parentheses* nil)
  (rt:disable-note :nil-vectors-are-strings))
sds's avatar
sds committed
49

50 51
#+gcl(si::use-fast-links nil)

52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
#+clisp
(progn                          ; see also clisp/utils/clispload.lsp
  ;; Paul Dietz assumes a particular implementation for sequence functions
  ;; (MAKE-SEQUENCE, CONCATENATE, MAP, ...) that rejects result types like
  ;; (OR (VECTOR BIT) (VECTOR T)) because the element type is ambiguous.
  ;; CLISP handles these ambiguous cases by computing the union type of the
  ;; possible element types and therefore does not need to give an error.
  (rt:disable-note :result-type-element-type-by-subtype)
  ;; for the pretty-printer
  (setq custom:*pprint-first-newline* nil)
  ;; for READ-BYTE.ERROR.3 READ-BYTE.ERROR.4 READ-BYTE.ERROR.6
  ;;  WRITE-BYTE.ERROR.3 OPEN.66 OPEN.OUTPUT.30
  (setq custom:*reopen-open-file* 'warn)
  ;; For ENSURE-DIRECTORIES-EXIST.8
  (when (ext:probe-directory "scratch/")
    (mapc #'delete-file (directory "scratch/*"))
    (ext:delete-dir "scratch/"))
  ;; A few tests call DISASSEMBLE. Make it work without user intervention.
  (setf (ext:getenv "PAGER") "cat")
  ;; One test exceeds the memory available in the SPVW_PURE_BLOCKS model.
  (when (and (= (logand (sys::address-of nil) #xffffff) 0) ; SPVW_PURE_BLOCKS ?
             (<= (integer-length most-positive-fixnum) 26)) ; 32-bit machine ?
    ;; Inhibit the CHAR-INT.2 test.
    (rt:rem-test 'cl-test:char-int.2)))

77
(in-package :cl-test)
78 79 80 81 82 83

;;; These two tests will misbehave if the tests are being
;;; invoked from a file that is being loaded, so remove them
(when *load-pathname*
  (mapc #'regression-test:rem-test '(load-pathname.1 load-truename.1)))

84 85 86
;; We could use uiop:chdir here, but what about new implementations?
(setf *default-pathname-defaults* (truename #P"sandbox/"))

87
(time (regression-test:do-tests))
88 89

#+allegro (cl-user::exit)
90
#+(or cmu sbcl gcl armedbear clisp) (cl-user::quit)