From 10d0729725fba852f8fb00907392de2c228c6a25 Mon Sep 17 00:00:00 2001
From: pfdietz <pfdietz@localhost>
Date: Sat, 1 May 2004 21:59:38 +0000
Subject: [PATCH] Tweak makefile, load scripts, README

---
 ansi-tests/README         | 16 ++++++++++++++--
 ansi-tests/compileit.lsp  | 32 ++++++++++++++++++++++++++++++++
 ansi-tests/doit.lsp       | 30 ++++++++++++++++++++++++++++++
 ansi-tests/gclload.lsp    | 12 ++++++++++++
 ansi-tests/makefile       | 22 +++++++++++++---------
 ansi-tests/rt-package.lsp |  1 +
 6 files changed, 102 insertions(+), 11 deletions(-)
 create mode 100644 ansi-tests/compileit.lsp
 create mode 100644 ansi-tests/doit.lsp

diff --git a/ansi-tests/README b/ansi-tests/README
index f40f50a3..bb4ecf35 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 00000000..250b9ccf
--- /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 00000000..5f2d4c69
--- /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 097e905d..f5384a99 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 91f4b619..fe6b6798 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 08bf1ee6..b751401a 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)
-- 
GitLab