Changeset 13925

05/04/12 13:48:56 (12 years ago)
Mark Evenson

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.

3 edited


  • trunk/abcl/abcl.asd

    r13924 r13925  
    6767   (funcall (intern (symbol-name 'run) :abcl.test.lisp)))
     70;;;; ASDF definitions and the ANSI-TEST
     73;;; We refer to the ANSI-TESTS source tree, which isn't shipped as
     74;;; part of ABCL, but may be obtained at
     75;;; <svn://>.
     77;;; We currently require that the ANSI-TESTS to be in a sibling
     78;;; directory named "ansi-tests" which should be manually synced with
     79;;; the contents of the SVN repository listed above.
     81;;; The ASDF definition for ABCL.TEST.ANSI defines VERIFY-ANSI-TESTS
     82;;; which provides a more useful diagnostic, but I can't seem to find
     83;;; a way to hook this into the ASDF:LOAD-OP phase
     84(defsystem :ansi-rt
     85  :description "Enapsulation of the REGRESSION-TEST framework use by ~
     86the ANSI test suite, so that we may build on its 'API'.
     88Requires that the contents of <svn://> ~
     89be in a directory named '../ansi-test/'."
     90  :pathname "../ansi-tests/" ;;; NB works when loaded from ASDF but not with a naked EVAL
     91  :default-component-class cl-source-file.lsp
     92  :components ((:file "rt-package")
     93               (:file "rt" :depends-on (rt-package))))
    6995(defsystem :ansi-interpreted
    7096  :version "1.2"
    71   :description "Test ABCL with the interpreted ANSI tests" :components
     97  :description "Test ABCL with the interpreted ANSI tests."
     98  :depends-on (ansi-rt) :components
    7299  ((:module ansi-tests :pathname "test/lisp/ansi/" :components
    73100            ((:file "packages")
    75102             (:file "parse-ansi-errors" :depends-on ("abcl-ansi"))))))
    76103(defmethod perform :before ((o test-op) (c (eql (find-system :ansi-interpreted))))
    77   (load-system  :ansi-interpreted))
     104  (load-system :ansi-interpreted))
    79106(defmethod perform :after ((o load-op) (c (eql (find-system :ansi-interpreted))))
    84111     :compile-tests nil))
    87113(defsystem :ansi-compiled :version "1.2"
    88            :description "Test ABCL with the compiled ANSI tests." :components
     114           :description "Test ABCL with the compiled ANSI tests."
     115           :depends-on (ansi-rt)
     116           :components
    89117           ((:module ansi-tests :pathname "test/lisp/ansi/" :components
    90118                     ((:file "packages")
  • trunk/abcl/test/lisp/ansi/abcl-ansi.lisp

    r13924 r13925  
    3737    (error 'file-error
    3838     "Failed to find the GCL ANSI tests in '~A'. Please
    39 locally obtain ~A, and set the value of *ANSI-TESTS-DIRECTORY* to that
    40 location." 
     39locally obtain ~A, and place it in a sibling directory to the ABCL source named '../ansi-tests/'"
    4140       *ansi-tests-directory*
    4241       *ansi-tests-master-source-location*)))
  • trunk/abcl/test/lisp/ansi/packages.lisp

    r13924 r13925  
    88           #:full-report
    99     #:report #:parse)
    10   (:import-from #:rt #:do-test #:do-test #:do-tests))
     10  ;; This should be REGRESSION-TEST included with the ANSI-TESTS, but
     11  ;; it is possible that the user may have included a slightly
     12  ;; different version from say Quicklisp. 
     13  (:import-from #:rt
     14                #:pend #:name
     15                #:*entries*
     16                #:do-test #:do-tests
     17                #:do-entries))
Note: See TracChangeset for help on using the changeset viewer.