-
Notifications
You must be signed in to change notification settings - Fork 0
/
doit.lsp
90 lines (76 loc) · 3.47 KB
/
doit.lsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
;;; 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*)
#+allegro (setq *enclose-printer-errors* nil)
(let ((wd (or *compile-file-pathname* *load-pathname*)))
(when wd
(setf *default-pathname-defaults*
(make-pathname :name nil :type nil :version nil :defaults wd))))
;;; Remove compiled files
(let* ((fn (compile-file-pathname "doit.lsp"))
(type (pathname-type fn))
(dir-pathname (make-pathname :name :wild :type type))
(subdir-pathname (make-pathname :directory '(:relative :wild)
:name :wild :type type))
(format-pathname (make-pathname :directory '(:relative "printer" "format")
:name :wild :type type))
(files (append (directory dir-pathname)
(directory subdir-pathname)
(directory format-pathname))))
(assert type)
(assert (not (string-equal type "lsp")))
(mapc #'delete-file files))
(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))
#+lispworks
(progn
(rtest:disable-note :allow-nil-arrays)
(rtest:disable-note :nil-vectors-are-strings))
#+cmu
(progn
(setf ext:*ignore-extra-close-parentheses* nil)
(rt:disable-note :nil-vectors-are-strings))
#+gcl(si::use-fast-links nil)
#+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)))
(in-package :cl-test)
;;; 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)))
;; We could use uiop:chdir here, but what about new implementations?
(setf *default-pathname-defaults* (truename #P"sandbox/"))
(time (regression-test:do-tests))
#+allegro (cl-user::exit)
#+(or cmu sbcl gcl armedbear clisp) (cl-user::quit)