| 1 | ;;; -*- Mode: Lisp -*- |
|---|
| 2 | |
|---|
| 3 | ;;; See also: |
|---|
| 4 | ;;; .clinit.cl (Allegro) |
|---|
| 5 | ;;; .cmucl-init.lisp (CMUCL) |
|---|
| 6 | ;;; .sbclrc (SBCL) |
|---|
| 7 | ;;; .clisprc.lisp (CLISP) |
|---|
| 8 | ;;; .lispworks (LispWorks) |
|---|
| 9 | |
|---|
| 10 | (defparameter *ansi-tests-directory* |
|---|
| 11 | #-(or windows mswindows win32) |
|---|
| 12 | #p"/home/peter/xcl/x/ansi-tests/" |
|---|
| 13 | #+(or windows mswindows win32) |
|---|
| 14 | #p"c:\\msys\\1.0\\home\\peter\\xcl\\x\ansi-tests\\") |
|---|
| 15 | |
|---|
| 16 | (defun run-ansi-tests (&optional (compile-tests t)) |
|---|
| 17 | (format t "COMPILE-TESTS is ~A~%" compile-tests) |
|---|
| 18 | (let ((*default-pathname-defaults* *ansi-tests-directory*)) |
|---|
| 19 | #+(and abcl unix) |
|---|
| 20 | (run-shell-command "make clean" :directory *default-pathname-defaults*) |
|---|
| 21 | (time (load (if compile-tests "compileit.lsp" "doit.lsp"))))) |
|---|
| 22 | |
|---|
| 23 | (defun run-random-tests (size nvars count) |
|---|
| 24 | (let ((*default-pathname-defaults* *ansi-tests-directory*)) |
|---|
| 25 | (load "gclload1.lsp") |
|---|
| 26 | (load "random-int-form.lsp") |
|---|
| 27 | (let ((f (find-symbol "TEST-RANDOM-INTEGER-FORMS" "CL-TEST"))) |
|---|
| 28 | (when f |
|---|
| 29 | (let (#+abcl (*suppress-compiler-warnings* t) |
|---|
| 30 | (*random-state* (make-random-state t))) |
|---|
| 31 | (time (funcall f size nvars count))))))) |
|---|
| 32 | |
|---|
| 33 | #+(or abcl sbcl clisp) |
|---|
| 34 | (defun test-cl-ppcre () |
|---|
| 35 | #+abcl (require "JVM") |
|---|
| 36 | (let ((*default-pathname-defaults* #-(or windows mswindows win32) |
|---|
| 37 | #p"/home/peter/cl-ppcre-1.2.19/" |
|---|
| 38 | #+(or windows mswindows win32) |
|---|
| 39 | #p"c:\\cygwin\\home\\peter\\cl-ppcre-1.2.19\\")) |
|---|
| 40 | #+abcl |
|---|
| 41 | (map nil #'delete-file (directory "*.abcl")) |
|---|
| 42 | #+sbcl |
|---|
| 43 | (map nil #'delete-file (directory "*.fasl")) |
|---|
| 44 | (load "load.lisp") |
|---|
| 45 | (let ((f (find-symbol "TEST" "CL-PPCRE-TEST"))) |
|---|
| 46 | (when f |
|---|
| 47 | #+abcl (gc) |
|---|
| 48 | (time (funcall f)) |
|---|
| 49 | #+abcl (gc) |
|---|
| 50 | (time (funcall f)))))) |
|---|
| 51 | |
|---|
| 52 | #+abcl |
|---|
| 53 | (defun run-other-tests () |
|---|
| 54 | (test-cl-ppcre) |
|---|
| 55 | (let ((*default-pathname-defaults* "/home/peter/salza-0.7.2/")) |
|---|
| 56 | (map nil #'delete-file (directory "*.abcl")) |
|---|
| 57 | (load "/home/peter/test-salza.lisp") |
|---|
| 58 | (gc) |
|---|
| 59 | (test-salza) |
|---|
| 60 | (gc) |
|---|
| 61 | (test-salza))) |
|---|
| 62 | |
|---|
| 63 | #+abcl |
|---|
| 64 | (autoload 'do-tests "rt.lisp") |
|---|
| 65 | |
|---|
| 66 | #+allegro |
|---|
| 67 | (top-level:alias "ap" (arg) (apropos arg nil nil t)) |
|---|
| 68 | #+allegro |
|---|
| 69 | (top-level:alias "de" (arg) (describe (eval arg))) |
|---|
| 70 | |
|---|
| 71 | #+cmu |
|---|
| 72 | (setf *gc-verbose* nil) |
|---|
| 73 | |
|---|
| 74 | ;; #+sbcl |
|---|
| 75 | ;; (require '#:asdf) |
|---|
| 76 | ;; #+sbcl |
|---|
| 77 | ;; (require '#:sb-aclrepl) |
|---|