[armedbear-cvs] r13925 - in trunk/abcl: . test/lisp/ansi

mevenson at common-lisp.net mevenson at common-lisp.net
Fri May 4 13:48:58 UTC 2012


Author: mevenson
Date: Fri May  4 06:48:56 2012
New Revision: 13925

Log:
ansi-tests: Fix ANSI-RT load definition.

A bit of a circular dance here to be able to use the ANSI-TESTS via
ASDF.  In order to define functions like
ABCL.TEST.ANSI:DO-TESTS-MATCHING we need to have loaded the
REGRESSION-TEST package included with the ANSI-TESTS, so we can no
longer use the value of the ABCL.TEST.ANSI:*ANSI-TESTS-DIRECTORY*.  We
now do this via a relative pathname of the form '../ansi-tests/' to
the location of 'abcl.asd' file, whereas our api previously suggested
that one could set the contents of
ABCL.TEST.ANSI:*ANSI-TESTS-DIRECTORY* to an arbitrary pathname.  This
fixes the location of the ANSI-TESTS on the filesystem to be a sibling
directory named 'ansi-tests' to the truename of the directory
containing 'abcl.asd'.

I tried to add some sort of :before method to either the ASDF:LOAD-OP
or the ASDF:COMPILE-OP for the ANSI-RT definition, but assuming that
the source named in an system definition exists locally seems too
baked into ASDF2 to be cleanly intercepted.

Modified:
   trunk/abcl/abcl.asd
   trunk/abcl/test/lisp/ansi/abcl-ansi.lisp
   trunk/abcl/test/lisp/ansi/packages.lisp

Modified: trunk/abcl/abcl.asd
==============================================================================
--- trunk/abcl/abcl.asd	Fri May  4 02:14:24 2012	(r13924)
+++ trunk/abcl/abcl.asd	Fri May  4 06:48:56 2012	(r13925)
@@ -66,15 +66,42 @@
    "Invoke tests with (asdf:oos 'asdf:test-op :abcl-test-lisp)."
    (funcall (intern (symbol-name 'run) :abcl.test.lisp)))
 
+;;;;
+;;;; ASDF definitions and the ANSI-TEST
+;;;;
+
+;;; We refer to the ANSI-TESTS source tree, which isn't shipped as
+;;; part of ABCL, but may be obtained at 
+;;; <svn://common-lisp.net/project/ansi-test/svn/trunk/ansi-tests>.
+
+;;; We currently require that the ANSI-TESTS to be in a sibling
+;;; directory named "ansi-tests" which should be manually synced with
+;;; the contents of the SVN repository listed above.
+
+;;; The ASDF definition for ABCL.TEST.ANSI defines VERIFY-ANSI-TESTS
+;;; which provides a more useful diagnostic, but I can't seem to find
+;;; a way to hook this into the ASDF:LOAD-OP phase
+(defsystem :ansi-rt
+  :description "Enapsulation of the REGRESSION-TEST framework use by ~
+the ANSI test suite, so that we may build on its 'API'.
+
+Requires that the contents of <svn://common-lisp.net/project/ansi-test/svn/trunk/ansi-tests> ~
+be in a directory named '../ansi-test/'."
+  :pathname "../ansi-tests/" ;;; NB works when loaded from ASDF but not with a naked EVAL
+  :default-component-class cl-source-file.lsp
+  :components ((:file "rt-package")
+               (:file "rt" :depends-on (rt-package))))
+
 (defsystem :ansi-interpreted 
   :version "1.2" 
-  :description "Test ABCL with the interpreted ANSI tests" :components 
+  :description "Test ABCL with the interpreted ANSI tests." 
+  :depends-on (ansi-rt) :components 
   ((:module ansi-tests :pathname "test/lisp/ansi/" :components
             ((:file "packages")
              (:file "abcl-ansi" :depends-on ("packages"))
              (:file "parse-ansi-errors" :depends-on ("abcl-ansi"))))))
 (defmethod perform :before ((o test-op) (c (eql (find-system :ansi-interpreted))))
-  (load-system  :ansi-interpreted))
+  (load-system :ansi-interpreted))
 
 (defmethod perform :after ((o load-op) (c (eql (find-system :ansi-interpreted))))
   (funcall (intern (symbol-name 'load-tests) :abcl.test.ansi)))
@@ -83,9 +110,10 @@
   (funcall (intern (symbol-name 'run) :abcl.test.ansi)
 	   :compile-tests nil))
 
-
 (defsystem :ansi-compiled :version "1.2" 
-           :description "Test ABCL with the compiled ANSI tests." :components 
+           :description "Test ABCL with the compiled ANSI tests." 
+           :depends-on (ansi-rt)
+           :components 
            ((:module ansi-tests :pathname "test/lisp/ansi/" :components
                      ((:file "packages")
                       (:file "abcl-ansi" :depends-on ("packages"))

Modified: trunk/abcl/test/lisp/ansi/abcl-ansi.lisp
==============================================================================
--- trunk/abcl/test/lisp/ansi/abcl-ansi.lisp	Fri May  4 02:14:24 2012	(r13924)
+++ trunk/abcl/test/lisp/ansi/abcl-ansi.lisp	Fri May  4 06:48:56 2012	(r13925)
@@ -36,8 +36,7 @@
       (probe-file *ansi-tests-directory*)
     (error 'file-error
 	   "Failed to find the GCL ANSI tests in '~A'. Please
-locally obtain ~A, and set the value of *ANSI-TESTS-DIRECTORY* to that
-location."  
+locally obtain ~A, and place it in a sibling directory to the ABCL source named '../ansi-tests/'"
 	     *ansi-tests-directory*
 	     *ansi-tests-master-source-location*)))
 

Modified: trunk/abcl/test/lisp/ansi/packages.lisp
==============================================================================
--- trunk/abcl/test/lisp/ansi/packages.lisp	Fri May  4 02:14:24 2012	(r13924)
+++ trunk/abcl/test/lisp/ansi/packages.lisp	Fri May  4 06:48:56 2012	(r13925)
@@ -7,7 +7,14 @@
 	   #:clean-tests
            #:full-report
 	   #:report #:parse)
-  (:import-from #:rt #:do-test #:do-test #:do-tests))
+  ;; This should be REGRESSION-TEST included with the ANSI-TESTS, but
+  ;; it is possible that the user may have included a slightly
+  ;; different version from say Quicklisp.  
+  (:import-from #:rt 
+                #:pend #:name
+                #:*entries* 
+                #:do-test #:do-tests 
+                #:do-entries))
 
 
 




More information about the armedbear-cvs mailing list