source: trunk/abcl/abcl.asd @ 13925

Last change on this file since 13925 was 13925, checked in by Mark Evenson, 9 years ago

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.

  • Property svn:keywords set to Id
File size: 6.1 KB
1;;; -*- Mode: LISP; Syntax: COMMON-LISP -*-
2;;; $Id: abcl.asd 13925 2012-05-04 13:48:56Z mevenson $
4(require 'asdf)
5(in-package :asdf)
7;;; Wrapper for all ABCL ASDF definitions.
8(defsystem :abcl :version "0.6.0")
10;;;  Run via (asdf:operate 'asdf:test-op :abcl :force t)
11(defmethod perform ((o test-op) (c (eql (find-system :abcl))))
12  (load-system (find-system :abcl-test-lisp))
13  (operate 'test-op :abcl-test-lisp))
15;;; Test ABCL with the Lisp unit tests collected in "test/lisp/abcl"
17;;; We guard with #+abcl for tests that other Lisps cannot load.  This
18;;; could be possibly be done at finer granularity in the files
19;;; themselves.
20(defsystem :abcl-test-lisp :version "1.2" :components
21     ((:module abcl-rt
22                     :pathname "test/lisp/abcl/" :serial t :components
23         ((:file "rt-package")
24                      (:file "rt")
25                      (:file "test-utilities")))
26      (:module package  :depends-on (abcl-rt)
27         :pathname "test/lisp/abcl/" :components
28         ((:file "package")))
29            (:module test :depends-on (package)
30         :pathname "test/lisp/abcl/" :components
31                     ((:file "utilities")
32                      (:file "compiler-tests")
33                      (:file "condition-tests")
34                      #+abcl
35                      (:file "class-file")
36                      #+abcl
37                      (:file "metaclass")
38                      #+abcl
39                      (:file "mop-tests-setup")
40                      #+abcl
41                      (:file "mop-tests" :depends-on
42                             ("mop-tests-setup"))
43                      (:file "file-system-tests")
44                      #+abcl
45                      (:file "jar-pathname" :depends-on
46                             ("utilities" "pathname-tests" "file-system-tests"))
47                      #+abcl
48                      (:file "url-pathname")
49                      (:file "math-tests" :depends-on
50                             ("compiler-tests"))
51                      (:file "misc-tests")
52                      (:file "latin1-tests")
53                      (:file "bugs" :depends-on
54                             ("file-system-tests"))
55                      (:file "wild-pathnames" :depends-on
56                             ("file-system-tests"))
57                      #+abcl
58                      (:file "weak-hash-tables")
59                      #+abcl
60                      (:file "zip")
61                      #+abcl
62                      (:file "pathname-tests" :depends-on
63                             ("utilities"))))))
65(defmethod perform ((o test-op) (c (eql (find-system 'abcl-test-lisp))))
66   "Invoke tests with (asdf:oos 'asdf:test-op :abcl-test-lisp)."
67   (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))))
95(defsystem :ansi-interpreted
96  :version "1.2"
97  :description "Test ABCL with the interpreted ANSI tests."
98  :depends-on (ansi-rt) :components
99  ((:module ansi-tests :pathname "test/lisp/ansi/" :components
100            ((:file "packages")
101             (:file "abcl-ansi" :depends-on ("packages"))
102             (:file "parse-ansi-errors" :depends-on ("abcl-ansi"))))))
103(defmethod perform :before ((o test-op) (c (eql (find-system :ansi-interpreted))))
104  (load-system :ansi-interpreted))
106(defmethod perform :after ((o load-op) (c (eql (find-system :ansi-interpreted))))
107  (funcall (intern (symbol-name 'load-tests) :abcl.test.ansi)))
109(defmethod perform ((o test-op) (c (eql (find-system :ansi-interpreted))))
110  (funcall (intern (symbol-name 'run) :abcl.test.ansi)
111     :compile-tests nil))
113(defsystem :ansi-compiled :version "1.2"
114           :description "Test ABCL with the compiled ANSI tests."
115           :depends-on (ansi-rt)
116           :components
117           ((:module ansi-tests :pathname "test/lisp/ansi/" :components
118                     ((:file "packages")
119                      (:file "abcl-ansi" :depends-on ("packages"))
120                      (:file "parse-ansi-errors" :depends-on ("abcl-ansi"))))))
122(defmethod perform :before ((o test-op) (c (eql (find-system :ansi-compiled))))
123  (load-system :ansi-compiled))
124(defmethod perform ((o test-op) (c (eql (find-system :ansi-compiled))))
125  (funcall (intern (symbol-name 'run) :abcl.test.ansi)
126     :compile-tests t))
128(defsystem :cl-bench
129  :description "Test ABCL with CL-BENCH."
130  :components ((:module cl-bench-package :pathname "../cl-bench/"
131                        :components ((:file "defpackage")))
132               (:module cl-bench-wrapper :pathname "test/lisp/cl-bench/"
133                        :depends-on (cl-bench-package) :components
134                        ((:file "wrapper")))))
135(defmethod perform :before ((o test-op) (c (eql (find-system :cl-bench))))
136  (load-system :cl-bench))
137(defmethod perform ((o test-op) (c (eql (find-system :cl-bench))))
138  (funcall (intern (symbol-name 'run)
140;;; Build ABCL from a Lisp.
141;;; aka the "Lisp-hosted build system"
142;;; Works for: abcl, sbcl, clisp, cmu, lispworks, allegro, openmcl
143(defsystem :build-abcl :components
144     ((:module build :pathname ""  :components
145         ((:file "build-abcl")
146          (:file "customizations" :depends-on ("build-abcl"))))))
Note: See TracBrowser for help on using the repository browser.