diff --git a/ansi-tests/README b/ansi-tests/README index f40f50a395082cc8b0c111855d8d4dbe94bea90e..bb4ecf355caf1bc8188f61961052dfc42b4fe366 100644 --- a/ansi-tests/README +++ b/ansi-tests/README @@ -1,12 +1,21 @@ This directory contains a partial Common Lisp standards compliance test suite. -To run the tests, load gclload.lsp. This will load and +To run the tests, load doit.lsp. This will load and run the tests. To just load the tests, load gclload1.lsp and gclload2.lsp. Individual tests may be run by (rt:do-test '<test name>). +Tests can be invoked from the makefile setting the enviroment variable +LISP to the lisp executable to be tested, then invoking + + make test + Run tests with test bodies EVALed. + + make test-compiled + Run tests with test bodies compiled before being EVALed. + Please tell me when you find incorrect test cases. Paul Dietz @@ -20,4 +29,7 @@ I've added a DEFNOTE form to define note objects whose names can be attached to properties of tests, to enable selective disabling of classes of tests. - +The file doit.lsp disables some contentious tests under certain +implementations using the note mechanism. If any implementor +wishes that some of these tests be inhibited in their implementation, +please contact me and I will add code to do so. diff --git a/ansi-tests/compileit.lsp b/ansi-tests/compileit.lsp new file mode 100644 index 0000000000000000000000000000000000000000..250b9ccf1987b186c1579f2b0445234bc0420f7e --- /dev/null +++ b/ansi-tests/compileit.lsp @@ -0,0 +1,32 @@ +;;; 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*) + +#+(and clisp (or win32 cygwin)) ; w2k exits on (disassemble 'car) +(without-package-lock ("SYS") + (defun sys::disassemble-machine-code (a b c) + (format t "~&<~S ~S ~S>~%" a b c))) + +#+allegro (run-shell-command "rm -f *.fasl") +#+cmucl (run-program "rm -f *.x86f") + +(load "gclload1.lsp") +(load "gclload2.lsp") + +(setq rt::*compile-tests* t) + +#+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)) + +(in-package :cl-test) +(time (regression-test:do-tests)) + +#+allegro :exit +#+(or cmucl sbcl gcl) (quit) diff --git a/ansi-tests/doit.lsp b/ansi-tests/doit.lsp new file mode 100644 index 0000000000000000000000000000000000000000..5f2d4c6918b91197b249fe2536d525d7691ad8fa --- /dev/null +++ b/ansi-tests/doit.lsp @@ -0,0 +1,30 @@ +;;; 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*) + +#+(and clisp (or win32 cygwin)) ; w2k exits on (disassemble 'car) +(without-package-lock ("SYS") + (defun sys::disassemble-machine-code (a b c) + (format t "~&<~S ~S ~S>~%" a b c))) + +#+allegro (run-shell-command "rm -f *.fasl") +#+cmucl (run-program "rm -f *.x86f") + +(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)) + +(in-package :cl-test) +(time (regression-test:do-tests)) + +#+allegro (cl-user::exit) +#+(or cmucl sbcl gcl armedbear) (cl-user::quit) diff --git a/ansi-tests/gclload.lsp b/ansi-tests/gclload.lsp index 097e905d9716200841702beccef7178b41afea76..f5384a99249631b1461c4e4ee31d19b02abef273 100644 --- a/ansi-tests/gclload.lsp +++ b/ansi-tests/gclload.lsp @@ -9,7 +9,19 @@ (defun sys::disassemble-machine-code (a b c) (format t "~&<~S ~S ~S>~%" a b c))) +#+allegro (run-shell-command "rm -f *.fasl") +#+cmucl (run-program "rm -f *.x86f") + (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)) + (in-package :cl-test) (time (regression-test:do-tests)) diff --git a/ansi-tests/makefile b/ansi-tests/makefile index 91f4b619d9b22df5ef5f4adc612d0ebb7e723091..fe6b67985470b33474849cb10b7d9c6dda266374 100644 --- a/ansi-tests/makefile +++ b/ansi-tests/makefile @@ -1,28 +1,32 @@ -LISP=gcl -ACL=~/acl62_trial/alisp +# LISP=gcl +# ACL=~/acl62_trial/alisp test: - rmdir scratch - echo "(load \"gclload.lsp\")" | $(LISP) | tee test.out + @rm -rf scratch + echo "(load \"doit.lsp\")" | $(LISP) | tee test.out + +test-compiled: + @rmdir -rf scratch + echo "(load \"compileit.lsp\")" | $(LISP) | tee test.out test-unixport: - echo "(load \"gclload.lsp\")" | ../unixport/saved_ansi_gcl | tee test.out + echo "(load \"doit.lsp\")" | ../unixport/saved_ansi_gcl | tee test.out random-test: echo "(load \"gclload1.lsp\") \ (compile-and-load \"random-int-form.lsp\") \ (in-package :cl-test) \ - (let ((x (cl-test::test-random-integer-forms 1000 3 200))) \ + (let ((x (cl-test::test-random-integer-forms 1000 3 1000))) \ (print (cl-test::prune-results x)) nil)" | $(LISP) + random-acl-test: echo "(progn (setq *load-verbose* nil) (load \"gclload1.lsp\")) \ (progn \ (compile-and-load \"random-int-form.lsp\") \ (in-package :cl-test) \ (setq cl-test::*compile-unoptimized-form* nil) \ - (let ((x (cl-test::test-random-integer-forms 1000 3 50))) \ + (let ((x (cl-test::test-random-integer-forms 1000 3 1000))) \ (print (cl-test::prune-results x)) nil))" | $(ACL) - clean: - rm -f test.out *.fasl *.o *.so *~ *.fn *.x86f *.fasl *.ufsl *.fas *.lib \#*\#; rm -rf scratch/; rm -f foo.txt foo.lsp file-that-was-renamed.txt tmp.dat temp.dat + rm -f test.out *.cls *.fasl *.o *.so *~ *.fn *.x86f *.fasl *.ufsl *.fas *.lib \#*\#; rm -rf scratch/; rm -f foo.txt foo.lsp file-that-was-renamed.txt tmp.dat temp.dat diff --git a/ansi-tests/rt-package.lsp b/ansi-tests/rt-package.lsp index 08bf1ee6a9b4b973bb399dfada1dd6603d65706e..b751401a1d89b76ae788a62bf9457b986c0fa50f 100644 --- a/ansi-tests/rt-package.lsp +++ b/ansi-tests/rt-package.lsp @@ -23,6 +23,7 @@ #:defnote #:my-aref #:*catch-errors* + #:disable-note ))) (in-package :regression-test)