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 "PRIMARY[/SECONDARY..]" 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/>.
parent 12f16229
;;; -*- Mode: LISP; Syntax: COMMON-LISP -*- ;;; -*- Mode: LISP; Syntax: COMMON-LISP -*-
;;; $Id$
(require :asdf) (require :asdf)
(in-package :asdf) (in-package :asdf)
#+abcl (defsystem :abcl :version "1.5.0"
(eval-when (:load-toplevel :execute) :in-order-to ((test-op (test-op "abcl/test/lisp"))))
(require :abcl-contrib)
(asdf:load-system :quicklisp-abcl))
;;; Wrapper for all ABCL ASDF definitions. (defsystem :abcl/test/lisp :version "1.5.0"
(defsystem :abcl :version "1.5.0") :description "Test ABCL with the its own collection of unit tests."
:perform (test-op (o s)
;;; Run via (asdf:operate 'asdf:test-op :abcl :force t) (uiop:symbol-call :abcl.test.lisp '#:run))
(defmethod perform ((o test-op) (c (eql (find-system :abcl)))) :components
(load-system (find-system :abcl-test-lisp))
(operate 'test-op :abcl-test-lisp))
;;; Test ABCL with the Lisp unit tests collected in "test/lisp/abcl"
;;;
;;; We guard with #+abcl for tests that other Lisps cannot load. This
;;; could be possibly be done at finer granularity in the files
;;; themselves.
(defsystem :abcl-test-lisp :version "1.5.0" :components
((:module abcl-rt ((:module abcl-rt
:pathname "test/lisp/abcl/" :serial t :components :pathname "test/lisp/abcl/" :serial t :components
((:file "rt-package") ((:file "rt-package")
...@@ -74,27 +62,22 @@ ...@@ -74,27 +62,22 @@
#+abcl #+abcl
(:file "package-local-nicknames-tests"))))) (:file "package-local-nicknames-tests")))))
(defmethod perform ((o test-op) (c (eql (find-system 'abcl-test-lisp)))) ;;;
"Invoke tests with (asdf:oos 'asdf:test-op :abcl-test-lisp)." ;;; ASDF definitions and the ANSI-TEST suite
(funcall (intern (symbol-name 'run) :abcl.test.lisp))) ;;;
;;; Below refer to the ANSI-TEST source tree, which isn't included as
;;;; ;;; part of ABCL, but may be obtained at
;;;; 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
;;; <git+https://gitlab.common-lisp.net/ansi-test/ansi-test.git> ;;; <git+https://gitlab.common-lisp.net/ansi-test/ansi-test.git>
;;; For the 'abcl/test/ansi/*' definitions to work, we require that
;;; We currently require that the ANSI-TESTS to be in a sibling ;;; the ANSI-TEST to be in a sibling directory named "ansi-tests"
;;; directory named "ansi-tests" which should be manually synced with ;;; which should be manually synced with the contents of the SVN
;;; the contents of the SVN repository listed above. ;;; repository listed above.
;;; The ABCL.TEST.ANSI defines a function VERIFY-ANSI-TESTS to check
;;; The ASDF definition for ABCL.TEST.ANSI defines VERIFY-ANSI-TESTS ;;; whether the test suite is present, which provides a more useful
;;; which provides a more useful diagnostic, but I can't seem to find ;;; diagnostic, but I can't seem to find a way to hook this into the
;;; a way to hook this into the ASDF:LOAD-OP phase ;;; ASDF:LOAD-OP phase.
(defsystem :ansi-rt (defsystem :abcl/ansi-rt
:description "Enapsulation of the REGRESSION-TEST framework use by ~ :description "Enapsulation of the REGRESSION-TEST framework used by ~
the ANSI test suite, so that we may build on its 'API'. the ANSI test suite, so that we may build on its 'API'.
Requires that the contents of <git+https://gitlab.common-lisp.net/ansi-test/ansi-test.git> ~ Requires that the contents of <git+https://gitlab.common-lisp.net/ansi-test/ansi-test.git> ~
...@@ -104,71 +87,54 @@ be in a directory named '../ansi-test/'." ...@@ -104,71 +87,54 @@ be in a directory named '../ansi-test/'."
:components ((:file "rt-package") :components ((:file "rt-package")
(:file "rt" :depends-on (rt-package)))) (:file "rt" :depends-on (rt-package))))
(defsystem :ansi-interpreted (defsystem :abcl/test/ansi
:version "1.2" :depends-on (abcl/ansi-rt)
:description "Test ABCL with the interpreted ANSI tests." :components
:depends-on (ansi-rt) :components
((:module ansi-tests :pathname "test/lisp/ansi/" :components ((:module ansi-tests :pathname "test/lisp/ansi/" :components
((:file "packages") ((:file "packages")
(:file "abcl-ansi" :depends-on ("packages")) (:file "abcl-ansi" :depends-on ("packages"))
(:file "parse-ansi-errors" :depends-on ("abcl-ansi")))))) (:file "parse-ansi-errors" :depends-on ("abcl-ansi"))))))
(defmethod perform :before ((o test-op) (c (eql (find-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)))
(defmethod perform ((o test-op) (c (eql (find-system :ansi-interpreted))))
(funcall (intern (symbol-name 'run) :abcl.test.ansi)
:compile-tests nil))
(defsystem :ansi-compiled :version "1.2" (defsystem :abcl/test/ansi/interpreted
:version "1.2"
:description "Test ABCL with the interpreted ANSI tests."
:depends-on (abcl/test/ansi)
:perform (test-op (o s)
(uiop:symbol-call :abcl.test.ansi 'run :compile-tests nil)))
(defsystem :abcl/test/ansi/compiled :version "1.2"
:description "Test ABCL with the compiled ANSI tests." :description "Test ABCL with the compiled ANSI tests."
:depends-on (ansi-rt) :depends-on (abcl/test/ansi)
:perform (test-op (o s)
(uiop:symbol-call :abcl.test.ansi 'run :compile-tests t))
:components :components
((:module ansi-tests :pathname "test/lisp/ansi/" :components ((:module ansi-tests :pathname "test/lisp/ansi/" :components
((:file "packages") ((:file "packages")
(:file "abcl-ansi" :depends-on ("packages")) (:file "abcl-ansi" :depends-on ("packages"))
(:file "parse-ansi-errors" :depends-on ("abcl-ansi")))))) (:file "parse-ansi-errors" :depends-on ("abcl-ansi"))))))
(defmethod perform :before ((o test-op) (c (eql (find-system :ansi-compiled)))) (defsystem :abcl/test/cl-bench
(load-system :ansi-compiled))
(defmethod perform ((o test-op) (c (eql (find-system :ansi-compiled))))
(funcall (intern (symbol-name 'run) :abcl.test.ansi)
:compile-tests t))
(defsystem :cl-bench
:description "Test ABCL with CL-BENCH." :description "Test ABCL with CL-BENCH."
:components ((:module cl-bench-package :pathname "../cl-bench/" :perform (test-op (o s)
(uiop:symbol-call :abcl.test.cl-bench 'run))
:components ((:module package :pathname "../cl-bench/"
:components ((:file "defpackage"))) :components ((:file "defpackage")))
(:module cl-bench-wrapper :pathname "test/lisp/cl-bench/" (:module wrapper :pathname "test/lisp/cl-bench/"
:depends-on (cl-bench-package) :components :depends-on (package) :components
((:file "wrapper"))))) ((:file "wrapper")))))
(defmethod perform :before ((o test-op) (c (eql (find-system :cl-bench))))
(load-system :cl-bench))
(defmethod perform ((o test-op) (c (eql (find-system :cl-bench))))
(funcall (intern (symbol-name 'run) :abcl.test.cl-bench)))
;;; Build ABCL from a Lisp. ;;; aka the "Lisp-hosted build system" which doesn't share build
;;; aka the "Lisp-hosted build system" ;;; instructions with the canonical build system in <file:build.xml>
;;; Works for: abcl, sbcl, clisp, cmu, lispworks, allegro, openmcl ;;; Works for: abcl, sbcl, clisp, cmu, lispworks, allegro, openmcl
(defsystem :build-abcl :components (defsystem :abcl/build
((:module build :pathname "" :components :description "Build ABCL from a Lisp. Not the canonical build recipe."
((:file "build-abcl") :components
(:file "customizations" :depends-on ("build-abcl")))))) ((:module build :pathname "" :components
((:file "build-abcl")
(defsystem :abcl-contrib (:file "customizations" :depends-on ("build-abcl"))))))
;; :version "1.1"
:components ((:static-file "README")))
;; #+nil ((:module source :pathname "src/org/armedbear/lisp/" :components
;; ((:file "abcl-contrib")
;; #+nil::needs-abcl-asdf (:iri "jar-file:dist/abcl-contrib.jar"))))
;; XXX Currently need to force load via (asdf:load-system :abcl-contrib :force t)
(defmethod perform ((o load-op) (c (eql (find-system :abcl-contrib))))
(require :abcl-contrib))
(defsystem :abcl/documentation (defsystem :abcl/documentation
:description "Tools to generate LaTeX source from docstrings."
:depends-on (swank) :depends-on (swank)
:components :components
((:module grovel :pathname "doc/manual/" :serial t ((:module grovel :pathname "doc/manual/" :serial t
......
...@@ -1023,8 +1023,7 @@ ${basedir}/../cl-bench ...@@ -1023,8 +1023,7 @@ ${basedir}/../cl-bench
<arg value="--eval"/><arg value="(require (quote asdf))"/> <arg value="--eval"/><arg value="(require (quote asdf))"/>
<arg value="--eval"/> <arg value="--eval"/>
<arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/> <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/>
<arg value="--eval"/><arg value="(asdf:load-system :abcl)"/> <arg value="--eval"/><arg value="(asdf:test-system :abcl/test/ansi/interpreted)"/>
<arg value="--eval"/><arg value="(asdf:test-system :ansi-interpreted)"/>
<arg value="--eval"/><arg value="(ext:exit)"/> <arg value="--eval"/><arg value="(ext:exit)"/>
</java> </java>
<record name="${abcl.test.log.file}" emacsmode="true" action="stop"/> <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
...@@ -1053,8 +1052,7 @@ ${basedir}/../cl-bench ...@@ -1053,8 +1052,7 @@ ${basedir}/../cl-bench
<arg value="--eval"/><arg value="(require (quote asdf))"/> <arg value="--eval"/><arg value="(require (quote asdf))"/>
<arg value="--eval"/> <arg value="--eval"/>
<arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/> <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/>
<arg value="--eval"/><arg value="(asdf:load-system :abcl)"/> <arg value="--eval"/><arg value="(asdf:test-system :abcl/test/ansi/compiled)"/>
<arg value="--eval"/><arg value="(asdf:test-system :ansi-compiled)"/>
<arg value="--eval"/><arg value="(ext:exit)"/> <arg value="--eval"/><arg value="(ext:exit)"/>
</java> </java>
<record name="${abcl.test.log.file}" emacsmode="true" action="stop"/> <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
...@@ -1071,8 +1069,7 @@ ${basedir}/../cl-bench ...@@ -1071,8 +1069,7 @@ ${basedir}/../cl-bench
<arg value="--eval"/><arg value="(require (quote asdf))"/> <arg value="--eval"/><arg value="(require (quote asdf))"/>
<arg value="--eval"/> <arg value="--eval"/>
<arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/> <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/>
<arg value="--eval"/><arg value="(asdf:load-system :abcl)"/> <arg value="--eval"/><arg value="(asdf:test-system :abcl)"/>
<arg value="--eval"/><arg value="(asdf:test-system :abcl-test-lisp)"/>
<arg value="--eval"/><arg value="(ext:exit)"/> <arg value="--eval"/><arg value="(ext:exit)"/>
</java> </java>
<record name="${abcl.test.log.file}" emacsmode="true" action="stop"/> <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
...@@ -1088,9 +1085,8 @@ ${basedir}/../cl-bench ...@@ -1088,9 +1085,8 @@ ${basedir}/../cl-bench
<arg value="--noinit"/> <arg value="--noinit"/>
<arg value="--eval"/><arg value="(require (quote asdf))"/> <arg value="--eval"/><arg value="(require (quote asdf))"/>
<arg value="--eval"/> <arg value="--eval"/>
<arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration)))"/> <arg value="(asdf:initialize-source-registry `(:source-registry (:directory ,*default-pathname-defaults*) :inherit-configuration))"/>
<arg value="--eval"/><arg value="(asdf:load-system :abcl)"/> <arg value="--eval"/><arg value="(asdf:test-system :abcl/test/cl-bench)"/>
<arg value="--eval"/><arg value="(asdf:test-system :cl-bench)"/>
<arg value="--eval"/><arg value="(ext:exit)"/> <arg value="--eval"/><arg value="(ext:exit)"/>
</java> </java>
<record name="${abcl.test.log.file}" emacsmode="true" action="stop"/> <record name="${abcl.test.log.file}" emacsmode="true" action="stop"/>
......
(require 'asdf) (require 'asdf)
(handler-case (handler-case
(progn (asdf:test-system :abcl/test/lisp :force t)
(asdf:oos 'asdf:load-op :abcl :force t)
(asdf:oos 'asdf:test-op :abcl-test-lisp :force t))
(t (e) (warn "Exiting after catching ~A" e))) (t (e) (warn "Exiting after catching ~A" e)))
(ext:exit) (ext:exit)
...@@ -26,12 +26,12 @@ ...@@ -26,12 +26,12 @@
(if (find :asdf2 *features*) (if (find :asdf2 *features*)
(merge-pathnames (merge-pathnames
(make-pathname :name (pathname-name *load-truename*)) (make-pathname :name (pathname-name *load-truename*))
(asdf:system-relative-pathname :abcl-test-lisp "test/lisp/abcl/")) (asdf:system-relative-pathname :abcl "test/lisp/abcl/"))
*load-truename*))) *load-truename*)))
(defparameter *this-directory* (defparameter *this-directory*
(if (find :asdf2 *features*) (if (find :asdf2 *features*)
(asdf:system-relative-pathname :abcl-test-lisp "test/lisp/abcl/") (asdf:system-relative-pathname :abcl "test/lisp/abcl/")
(make-pathname :host (pathname-host *load-truename*) (make-pathname :host (pathname-host *load-truename*)
:device (pathname-device *load-truename*) :device (pathname-device *load-truename*)
:directory (pathname-directory *load-truename*)))) :directory (pathname-directory *load-truename*))))
......
...@@ -10,13 +10,13 @@ ...@@ -10,13 +10,13 @@
#:pathnames-equal-p #:run-shell-command #:copy-file #:make-symbolic-link #:pathnames-equal-p #:run-shell-command #:copy-file #:make-symbolic-link
#:touch #:make-temporary-directory #:delete-directory-and-files #:touch #:make-temporary-directory #:delete-directory-and-files
;;; Deprecated ;;; Deprecated
#:do-matching #:run-matching #:do-matching #:run-matching))
))
(in-package #:abcl.test.lisp) (in-package #:abcl.test.lisp)
(defparameter *abcl-test-directory* (defparameter *abcl-test-directory*
(if (find :asdf2 *features*) (if (find :asdf2 *features*)
(asdf:system-relative-pathname :abcl-test-lisp "test/lisp/abcl/") (asdf:system-relative-pathname :abcl "test/lisp/abcl/")
(make-pathname :host (pathname-host *load-truename*) (make-pathname :host (pathname-host *load-truename*)
:device (pathname-device *load-truename*) :device (pathname-device *load-truename*)
:directory (pathname-directory *load-truename*)))) :directory (pathname-directory *load-truename*))))
...@@ -50,4 +50,4 @@ ...@@ -50,4 +50,4 @@
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"<git+https://gitlab.common-lisp.net/ansi-test/ansi-test.git>") "<git+https://gitlab.common-lisp.net/ansi-test/ansi-test.git>")
(defparameter *ansi-tests-directory* (defparameter *ansi-tests-directory*
(asdf:system-relative-pathname :ansi-compiled "../ansi-test/")) (asdf:system-relative-pathname :abcl/test/ansi/compiled "../ansi-test/"))
(defun run (&key (compile-tests nil)) (defun run (&key (compile-tests nil))
"Run the ANSI-TESTS suite, to be found in *ANSI-TESTS-DIRECTORY*. "Run the ANSI-TESTS suite, to be found in *ANSI-TESTS-DIRECTORY*.
...@@ -12,7 +12,7 @@ Possibly running the compiled version of the tests if COMPILE-TESTS is non-NIL." ...@@ -12,7 +12,7 @@ Possibly running the compiled version of the tests if COMPILE-TESTS is non-NIL."
(verify-ansi-tests) (verify-ansi-tests)
(mapcar (lambda (result) (mapcar (lambda (result)
(when (second result) (when (second result)
(format t "Removed ~A.~&" (first result)))) (format t "~&Removed '~A'.~%" (first result))))
(clean-tests)) (clean-tests))
(let* ((ansi-tests-directory (let* ((ansi-tests-directory
*ansi-tests-directory*) *ansi-tests-directory*)
......
...@@ -78,9 +78,8 @@ An example on an entry: ...@@ -78,9 +78,8 @@ An example on an entry:
(return-from get-hash-table *compileit*)))) (return-from get-hash-table *compileit*))))
(defvar *default-database-file* (defvar *default-database-file*
(if (find :asdf2 *features*) (asdf:system-relative-pathname
(asdf:system-relative-pathname :ansi-compiled "test/lisp/ansi/ansi-test-failures") :abcl "test/lisp/ansi/ansi-test-failures"))
(merge-pathnames "ansi-test-failures" (directory-namestring *load-truename*))))
(defun parse (&optional (file *default-database-file*)) (defun parse (&optional (file *default-database-file*))
"Parse the ansi test database present at *DEFAULT-DATABASE-FILE*. "Parse the ansi test database present at *DEFAULT-DATABASE-FILE*.
......
...@@ -9,11 +9,7 @@ ...@@ -9,11 +9,7 @@
"<http://www.chez.com/emarsden/downloads/cl-bench.tar.gz>") "<http://www.chez.com/emarsden/downloads/cl-bench.tar.gz>")
(defparameter *cl-bench-directory* (defparameter *cl-bench-directory*
(if (find :asdf2 *features*) (asdf:system-relative-pathname :abcl "../cl-bench/"))
(asdf:system-relative-pathname
:cl-bench "../cl-bench/")
(merge-pathnames #p"../cl-bench/"
(component-pathname (find-system :abcl)))))
;;; cl-bench defines BENCH-GC and WITH-SPAWNED-THREAD in ;;; cl-bench defines BENCH-GC and WITH-SPAWNED-THREAD in
;;; '*cl-bench-directory*/sysdep/setup-ablisp.lisp'. ;;; '*cl-bench-directory*/sysdep/setup-ablisp.lisp'.
......
...@@ -40,15 +40,11 @@ known version in which the 'check.lisp' raises the error. ...@@ -40,15 +40,11 @@ known version in which the 'check.lisp' raises the error.
;;; XXX separate out runtime yucky top-level forms ;;; XXX separate out runtime yucky top-level forms
(require :asdf) (require :asdf)
(require :abcl-contrib) (require :abcl-contrib)
(require :asdf-install) ;;; to push "~/.asdf-install-dir/systems/" into ASDF:*CENTRAL-REGISTRY*
;;; The ASDF definition for ANSI-COMPILED contains the ANSI-TESTS package. ;;; The ASDF definition for ANSI-COMPILED contains the ANSI-TESTS package.
;;; The CL-TEST package is defined by the GCL ANSI tests. ;;; The CL-TEST package is defined by the GCL ANSI tests.
(eval-when (:load-toplevel :execute) (eval-when (:load-toplevel :execute)
(asdf:load-system :abcl) (asdf:load-system :abcl/test/ansi/compiled)
(asdf:load-system :ansi-compiled)
(ansi-tests:load-tests)) ;; TODO figure out how to not load all the tests (ansi-tests:load-tests)) ;; TODO figure out how to not load all the tests
(defparameter *test* (defparameter *test*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment