Changeset 14912


Ignore:
Timestamp:
11/19/16 12:34:20 (7 years ago)
Author:
Mark Evenson
Message:

Re-write the ABCL ASDF description using secondary systems

Future versions of ASDF will start complaining when multiple DEFSYSTEM
forms occupy a given file unit, but the systems named therein don't
use the "PRIMARYSECONDARY.." naming conventions.

(asdf:test-system :abcl)
Run the ABCL tests located under <file:test/lisp/abcl/>

(asdf:test-system :abcl/test/ansi/compiled)
Run the compiled version of the ANSI tests in <file:../ansi-test/>.

(asdf:test-system :abcl/test/ansi/interpreted)
Run the interpreted version of the ANSI tests in <file:../ansi-test/>.

(asdf:test-system :abcl/test/cl-bench)
Run the CL-BENCH test suite in <file:../cl-bench/>.

Location:
trunk/abcl
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/abcl.asd

    r14900 r14912  
    11;;; -*- Mode: LISP; Syntax: COMMON-LISP -*-
    2 ;;; $Id$
    32
    43(require :asdf)
    54(in-package :asdf)
    65
    7 #+abcl
    8 (eval-when (:load-toplevel :execute)
    9   (require :abcl-contrib)
    10   (asdf:load-system :quicklisp-abcl))
     6(defsystem :abcl :version "1.5.0"
     7           :in-order-to ((test-op (test-op "abcl/test/lisp"))))
    118
    12 ;;; Wrapper for all ABCL ASDF definitions.
    13 (defsystem :abcl :version "1.5.0")
    14 
    15 ;;;  Run via (asdf:operate 'asdf:test-op :abcl :force t)
    16 (defmethod perform ((o test-op) (c (eql (find-system :abcl))))
    17   (load-system (find-system :abcl-test-lisp))
    18   (operate 'test-op :abcl-test-lisp))
    19 
    20 ;;; Test ABCL with the Lisp unit tests collected in "test/lisp/abcl"
    21 ;;;
    22 ;;; We guard with #+abcl for tests that other Lisps cannot load.  This
    23 ;;; could be possibly be done at finer granularity in the files
    24 ;;; themselves.
    25 (defsystem :abcl-test-lisp :version "1.5.0" :components
     9(defsystem :abcl/test/lisp :version "1.5.0"
     10           :description "Test ABCL with the its own collection of unit tests."
     11           :perform  (test-op (o s)
     12                              (uiop:symbol-call :abcl.test.lisp '#:run))
     13           :components
    2614     ((:module abcl-rt
    2715                     :pathname "test/lisp/abcl/" :serial t :components
     
    7563                      (:file "package-local-nicknames-tests")))))
    7664
    77 (defmethod perform ((o test-op) (c (eql (find-system 'abcl-test-lisp))))
    78    "Invoke tests with (asdf:oos 'asdf:test-op :abcl-test-lisp)."
    79    (funcall (intern (symbol-name 'run) :abcl.test.lisp)))
    80 
    81 ;;;;
    82 ;;;; ASDF definitions and the ANSI-TEST
    83 ;;;;
    84 
    85 ;;; We refer to the ANSI-TESTS source tree, which isn't shipped as
    86 ;;; part of ABCL, but may be obtained at
     65;;;
     66;;; ASDF definitions and the ANSI-TEST suite
     67;;;
     68;;; Below refer to the ANSI-TEST source tree, which isn't included as
     69;;; part of ABCL, but may be obtained at
    8770;;; <git+https://gitlab.common-lisp.net/ansi-test/ansi-test.git>
    88 
    89 ;;; We currently require that the ANSI-TESTS to be in a sibling
    90 ;;; directory named "ansi-tests" which should be manually synced with
    91 ;;; the contents of the SVN repository listed above.
    92 
    93 ;;; The ASDF definition for ABCL.TEST.ANSI defines VERIFY-ANSI-TESTS
    94 ;;; which provides a more useful diagnostic, but I can't seem to find
    95 ;;; a way to hook this into the ASDF:LOAD-OP phase
    96 (defsystem :ansi-rt
    97   :description "Enapsulation of the REGRESSION-TEST framework use by ~
     71;;; For the 'abcl/test/ansi/*' definitions to work, we require that
     72;;; the ANSI-TEST to be in a sibling directory named "ansi-tests"
     73;;; which should be manually synced with the contents of the SVN
     74;;; repository listed above.
     75;;; The ABCL.TEST.ANSI defines a function VERIFY-ANSI-TESTS to check
     76;;; whether the test suite is present, which provides a more useful
     77;;; diagnostic, but I can't seem to find a way to hook this into the
     78;;; ASDF:LOAD-OP phase.
     79(defsystem :abcl/ansi-rt
     80  :description "Enapsulation of the REGRESSION-TEST framework used by ~
    9881the ANSI test suite, so that we may build on its 'API'.
    9982
     
    10588               (:file "rt" :depends-on (rt-package))))
    10689
    107 (defsystem :ansi-interpreted
    108   :version "1.2"
    109   :description "Test ABCL with the interpreted ANSI tests."
    110   :depends-on (ansi-rt) :components
     90(defsystem :abcl/test/ansi
     91  :depends-on (abcl/ansi-rt)
     92  :components
    11193  ((:module ansi-tests :pathname "test/lisp/ansi/" :components
    11294            ((:file "packages")
    11395             (:file "abcl-ansi" :depends-on ("packages"))
    11496             (:file "parse-ansi-errors" :depends-on ("abcl-ansi"))))))
    115 (defmethod perform :before ((o test-op) (c (eql (find-system :ansi-interpreted))))
    116   (load-system :ansi-interpreted))
    11797
    118 (defmethod perform :after ((o load-op) (c (eql (find-system :ansi-interpreted))))
    119   (funcall (intern (symbol-name 'load-tests) :abcl.test.ansi)))
    120 
    121 (defmethod perform ((o test-op) (c (eql (find-system :ansi-interpreted))))
    122   (funcall (intern (symbol-name 'run) :abcl.test.ansi)
    123      :compile-tests nil))
    124 
    125 (defsystem :ansi-compiled :version "1.2"
     98(defsystem :abcl/test/ansi/interpreted
     99  :version "1.2"
     100  :description "Test ABCL with the interpreted ANSI tests."
     101  :depends-on (abcl/test/ansi)
     102  :perform (test-op (o s)
     103                    (uiop:symbol-call :abcl.test.ansi 'run :compile-tests nil)))
     104 
     105(defsystem :abcl/test/ansi/compiled :version "1.2"
    126106           :description "Test ABCL with the compiled ANSI tests."
    127            :depends-on (ansi-rt)
     107           :depends-on (abcl/test/ansi)
     108           :perform (test-op (o s)
     109                             (uiop:symbol-call :abcl.test.ansi 'run :compile-tests t))
    128110           :components
    129111           ((:module ansi-tests :pathname "test/lisp/ansi/" :components
     
    132114                      (:file "parse-ansi-errors" :depends-on ("abcl-ansi"))))))
    133115
    134 (defmethod perform :before ((o test-op) (c (eql (find-system :ansi-compiled))))
    135   (load-system :ansi-compiled))
    136 (defmethod perform ((o test-op) (c (eql (find-system :ansi-compiled))))
    137   (funcall (intern (symbol-name 'run) :abcl.test.ansi)
    138      :compile-tests t))
    139 
    140 (defsystem :cl-bench
     116(defsystem :abcl/test/cl-bench
    141117  :description "Test ABCL with CL-BENCH."
    142   :components ((:module cl-bench-package :pathname "../cl-bench/"
     118  :perform (test-op (o s)
     119                    (uiop:symbol-call :abcl.test.cl-bench 'run))
     120  :components ((:module package :pathname "../cl-bench/"
    143121                        :components ((:file "defpackage")))
    144                (:module cl-bench-wrapper :pathname "test/lisp/cl-bench/"
    145                         :depends-on (cl-bench-package) :components
     122               (:module wrapper :pathname "test/lisp/cl-bench/"
     123                        :depends-on (package) :components
    146124                        ((:file "wrapper")))))
    147 (defmethod perform :before ((o test-op) (c (eql (find-system :cl-bench))))
    148   (load-system :cl-bench))
    149 (defmethod perform ((o test-op) (c (eql (find-system :cl-bench))))
    150   (funcall (intern (symbol-name 'run) :abcl.test.cl-bench)))
    151125 
    152 ;;; Build ABCL from a Lisp.
    153 ;;; aka the "Lisp-hosted build system"
     126;;; aka the "Lisp-hosted build system" which doesn't share build
     127;;; instructions with the canonical build system in <file:build.xml>
    154128;;; Works for: abcl, sbcl, clisp, cmu, lispworks, allegro, openmcl
    155 (defsystem :build-abcl :components
    156      ((:module build :pathname ""  :components
    157          ((:file "build-abcl")
    158           (:file "customizations" :depends-on ("build-abcl"))))))
    159 
    160 (defsystem :abcl-contrib
    161   ;; :version "1.1"
    162   :components ((:static-file "README")))
    163   ;; #+nil ((:module source :pathname "src/org/armedbear/lisp/" :components
    164   ;;                       ((:file  "abcl-contrib")
    165   ;;                        #+nil::needs-abcl-asdf (:iri "jar-file:dist/abcl-contrib.jar"))))
    166 
    167 ;; XXX Currently need to force load via (asdf:load-system :abcl-contrib :force t)
    168 (defmethod perform ((o load-op) (c (eql (find-system :abcl-contrib))))
    169  (require :abcl-contrib))
     129(defsystem :abcl/build
     130  :description "Build ABCL from a Lisp.  Not the canonical build recipe."
     131  :components
     132  ((:module build :pathname ""  :components
     133            ((:file "build-abcl")
     134             (:file "customizations" :depends-on ("build-abcl"))))))
    170135
    171136(defsystem :abcl/documentation
     137  :description "Tools to generate LaTeX source from docstrings."
    172138  :depends-on (swank)
    173139  :components
  • trunk/abcl/build.xml

    r14908 r14912  
    10241024        <arg value="--eval"/>
    10251025          <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/>
    1026         <arg value="--eval"/><arg value="(asdf:load-system :abcl)"/>
    1027         <arg value="--eval"/><arg value="(asdf:test-system :ansi-interpreted)"/>
     1026        <arg value="--eval"/><arg value="(asdf:test-system :abcl/test/ansi/interpreted)"/>
    10281027        <arg value="--eval"/><arg value="(ext:exit)"/>
    10291028      </java>
     
    10541053        <arg value="--eval"/>
    10551054          <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/>
    1056         <arg value="--eval"/><arg value="(asdf:load-system :abcl)"/>
    1057         <arg value="--eval"/><arg value="(asdf:test-system :ansi-compiled)"/>
     1055        <arg value="--eval"/><arg value="(asdf:test-system :abcl/test/ansi/compiled)"/>
    10581056        <arg value="--eval"/><arg value="(ext:exit)"/>
    10591057      </java>
     
    10721070        <arg value="--eval"/>
    10731071          <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/>
    1074         <arg value="--eval"/><arg value="(asdf:load-system :abcl)"/>
    1075         <arg value="--eval"/><arg value="(asdf:test-system :abcl-test-lisp)"/>
     1072        <arg value="--eval"/><arg value="(asdf:test-system :abcl)"/>
    10761073        <arg value="--eval"/><arg value="(ext:exit)"/>
    10771074      </java>
     
    10891086        <arg value="--eval"/><arg value="(require (quote asdf))"/>
    10901087        <arg value="--eval"/>
    1091           <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/>
    1092         <arg value="--eval"/><arg value="(asdf:load-system :abcl)"/>
    1093         <arg value="--eval"/><arg value="(asdf:test-system :cl-bench)"/>
     1088          <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration))"/>
     1089        <arg value="--eval"/><arg value="(asdf:test-system :abcl/test/cl-bench)"/>
    10941090        <arg value="--eval"/><arg value="(ext:exit)"/>
    10951091      </java>
  • trunk/abcl/test/lisp/abcl/abcl-test.lisp

    r11606 r14912  
    11(require 'asdf)
    22(handler-case
    3     (progn
    4       (asdf:oos 'asdf:load-op :abcl :force t)
    5       (asdf:oos 'asdf:test-op :abcl-test-lisp :force t))
     3    (asdf:test-system :abcl/test/lisp :force t)
    64  (t (e) (warn "Exiting after catching ~A" e)))
    75(ext:exit)
  • trunk/abcl/test/lisp/abcl/file-system-tests.lisp

    r14246 r14912  
    2727                       (merge-pathnames
    2828                        (make-pathname :name (pathname-name *load-truename*))
    29                         (asdf:system-relative-pathname :abcl-test-lisp "test/lisp/abcl/"))
     29                        (asdf:system-relative-pathname :abcl "test/lisp/abcl/"))
    3030                       *load-truename*)))
    3131
    3232(defparameter *this-directory*
    3333  (if (find :asdf2 *features*)
    34       (asdf:system-relative-pathname :abcl-test-lisp "test/lisp/abcl/")
     34      (asdf:system-relative-pathname :abcl "test/lisp/abcl/")
    3535      (make-pathname :host (pathname-host *load-truename*)
    3636                     :device (pathname-device *load-truename*)
  • trunk/abcl/test/lisp/abcl/package.lisp

    r13935 r14912  
    1111   #:touch #:make-temporary-directory #:delete-directory-and-files
    1212   ;;; Deprecated
    13    #:do-matching #:run-matching
    14    ))
     13   #:do-matching #:run-matching))
     14
    1515(in-package #:abcl.test.lisp)
    1616
    1717(defparameter *abcl-test-directory*
    1818  (if (find :asdf2 *features*)
    19       (asdf:system-relative-pathname :abcl-test-lisp "test/lisp/abcl/")
     19      (asdf:system-relative-pathname :abcl "test/lisp/abcl/")
    2020      (make-pathname :host (pathname-host *load-truename*)
    2121                     :device (pathname-device *load-truename*)
  • trunk/abcl/test/lisp/ansi/abcl-ansi.lisp

    r14815 r14912  
    55
    66(defparameter *ansi-tests-directory*
    7   (asdf:system-relative-pathname :ansi-compiled "../ansi-test/"))
     7  (asdf:system-relative-pathname :abcl/test/ansi/compiled "../ansi-test/"))
    88
    99(defun run (&key (compile-tests nil))
     
    1313  (mapcar (lambda (result)
    1414            (when (second result)
    15               (format t "Removed ~A.~&" (first result))))
     15              (format t "~&Removed '~A'.~%" (first result))))
    1616          (clean-tests))
    1717  (let* ((ansi-tests-directory
  • trunk/abcl/test/lisp/ansi/parse-ansi-errors.lisp

    r13401 r14912  
    7979
    8080(defvar *default-database-file*
    81   (if (find :asdf2 *features*)
    82       (asdf:system-relative-pathname :ansi-compiled "test/lisp/ansi/ansi-test-failures")
    83       (merge-pathnames "ansi-test-failures" (directory-namestring *load-truename*))))
     81  (asdf:system-relative-pathname
     82   :abcl "test/lisp/ansi/ansi-test-failures"))
    8483
    8584(defun parse (&optional (file *default-database-file*))
  • trunk/abcl/test/lisp/cl-bench/wrapper.lisp

    r12618 r14912  
    1010
    1111(defparameter *cl-bench-directory*
    12   (if (find :asdf2 *features*)
    13       (asdf:system-relative-pathname
    14        :cl-bench "../cl-bench/")
    15       (merge-pathnames #p"../cl-bench/"
    16                        (component-pathname (find-system :abcl)))))
     12  (asdf:system-relative-pathname :abcl "../cl-bench/"))
    1713 
    1814;;; cl-bench defines BENCH-GC and WITH-SPAWNED-THREAD in
  • trunk/abcl/tools/check.lisp

    r13941 r14912  
    4141(require :asdf)
    4242(require :abcl-contrib)
    43 (require :asdf-install)  ;;; to push "~/.asdf-install-dir/systems/" into ASDF:*CENTRAL-REGISTRY*
    44 
    45 
    4643
    4744;;; The ASDF definition for ANSI-COMPILED contains the ANSI-TESTS package.
    4845;;; The CL-TEST package is defined by the GCL ANSI tests.
    4946(eval-when (:load-toplevel :execute)
    50   (asdf:load-system :abcl)
    51   (asdf:load-system :ansi-compiled)
     47  (asdf:load-system :abcl/test/ansi/compiled)
    5248  (ansi-tests:load-tests)) ;; TODO figure out how to not load all the tests
    5349
Note: See TracChangeset for help on using the changeset viewer.