| 1 | ;;; -*- Mode: LISP; Syntax: COMMON-LISP -*- |
|---|
| 2 | ;;; $Id: abcl.asd 12338 2010-01-06 15:52:13Z mevenson $ |
|---|
| 3 | |
|---|
| 4 | (require 'asdf) |
|---|
| 5 | (defpackage :abcl-asdf |
|---|
| 6 | (:use :cl :asdf)) |
|---|
| 7 | (in-package :abcl-asdf) |
|---|
| 8 | |
|---|
| 9 | ;;; Wrapper for all ABCL ASDF definitions. |
|---|
| 10 | (defsystem :abcl :version "0.5.0") |
|---|
| 11 | |
|---|
| 12 | (defmethod perform :after ((o load-op) (c (eql (find-system :abcl)))) |
|---|
| 13 | (operate 'load-op :abcl-tests :force t) |
|---|
| 14 | (operate 'load-op :abcl-test-lisp :force t) |
|---|
| 15 | (operate 'load-op :cl-bench :force t) |
|---|
| 16 | (operate 'load-op :ansi-compiled :force t) |
|---|
| 17 | (operate 'load-op :ansi-interpreted :force t)) |
|---|
| 18 | |
|---|
| 19 | ;;; Run via (asdf:operate 'asdf:test-op :abcl :force t) |
|---|
| 20 | (defmethod perform ((o test-op) (c (eql (find-system :abcl)))) |
|---|
| 21 | (operate 'test-op :abcl-tests :force t)) |
|---|
| 22 | |
|---|
| 23 | ;;; A collection of test suites for ABCL. |
|---|
| 24 | (defsystem :abcl-tests |
|---|
| 25 | :version "2.0" |
|---|
| 26 | :depends-on (:abcl-test-lisp |
|---|
| 27 | :ansi-compiled :ansi-interpreted |
|---|
| 28 | :cl-bench)) |
|---|
| 29 | |
|---|
| 30 | (defmethod perfom :before ((o test-op (c (eql find-system :abcl-tests)))) |
|---|
| 31 | (operate 'load-op :abcl-test-lisp) |
|---|
| 32 | (operate 'load-op :ansi-compiled) |
|---|
| 33 | (operate 'load-op :cl-bench)) |
|---|
| 34 | |
|---|
| 35 | ;;; Run via (asdf:operate 'asdf:test-op :abcl-tests :force t) |
|---|
| 36 | (defmethod perform ((o test-op) (c (eql (find-system :abcl-tests)))) |
|---|
| 37 | ;; Additional test suite invocations would go here. |
|---|
| 38 | (operate 'test-op :abcl-test-lisp) |
|---|
| 39 | (operate 'test-op :ansi-compiled) |
|---|
| 40 | (operate 'test-op :cl-bench)) |
|---|
| 41 | |
|---|
| 42 | ;;; Test ABCL with the Lisp unit tests collected in "test/lisp/abcl" |
|---|
| 43 | (defsystem :abcl-test-lisp :version "1.1" :components |
|---|
| 44 | ((:module abcl-rt :pathname "test/lisp/abcl/" :serial t :components |
|---|
| 45 | ((:file "rt-package") (:file "rt"))) |
|---|
| 46 | (:module package :depends-on (abcl-rt) |
|---|
| 47 | :pathname "test/lisp/abcl/" :components |
|---|
| 48 | ((:file "package"))))) |
|---|
| 49 | (defmethod perform :before ((o test-op) (c (eql (find-system |
|---|
| 50 | :abcl-test-lisp)))) |
|---|
| 51 | (operate 'load-op :abcl-test-lisp :force t)) |
|---|
| 52 | (defmethod perform ((o test-op) (c (eql (find-system 'abcl-test-lisp)))) |
|---|
| 53 | "Invoke tests with (asdf:oos 'asdf:test-op :abcl-test-lisp)." |
|---|
| 54 | (funcall (intern (symbol-name 'run) :abcl-test))) |
|---|
| 55 | |
|---|
| 56 | ;;; Test ABCL with the interpreted ANSI tests |
|---|
| 57 | (defsystem :ansi-interpreted :version "1.0.1" |
|---|
| 58 | :components |
|---|
| 59 | ((:module ansi-tests :pathname "test/lisp/ansi/" :components |
|---|
| 60 | ((:file "package"))))) |
|---|
| 61 | (defmethod perform :before ((o test-op) (c (eql (find-system :ansi-interpreted)))) |
|---|
| 62 | (operate 'load-op :ansi-interpreted)) |
|---|
| 63 | (defmethod perform ((o test-op) (c (eql (find-system :ansi-interpreted)))) |
|---|
| 64 | (funcall (intern (symbol-name 'run) :abcl.test.ansi) |
|---|
| 65 | :compile-tests nil)) |
|---|
| 66 | |
|---|
| 67 | ;;; Test ABCL with the compiled ANSI tests |
|---|
| 68 | (defsystem :ansi-compiled :version "1.0.1" |
|---|
| 69 | :components |
|---|
| 70 | ((:module ansi-tests :pathname "test/lisp/ansi/" :components |
|---|
| 71 | ((:file "package"))))) |
|---|
| 72 | (defmethod perform :before ((o test-op) (c (eql (find-system :ansi-compiled)))) |
|---|
| 73 | (operate 'load-op :ansi-compiled)) |
|---|
| 74 | (defmethod perform ((o test-op) (c (eql (find-system :ansi-compiled)))) |
|---|
| 75 | (funcall (intern (symbol-name 'run) :abcl.test.ansi) |
|---|
| 76 | :compile-tests t)) |
|---|
| 77 | |
|---|
| 78 | |
|---|
| 79 | ;;; Test ABCL with CL-BENCH |
|---|
| 80 | (defsystem :cl-bench :components |
|---|
| 81 | ((:module cl-bench-package :pathname "../cl-bench/" |
|---|
| 82 | :components ((:file "defpackage"))) |
|---|
| 83 | (:module cl-bench-wrapper :pathname "test/lisp/cl-bench/" |
|---|
| 84 | :depends-on (cl-bench-package) :components |
|---|
| 85 | ((:file "wrapper"))))) |
|---|
| 86 | (defmethod perform :before ((o test-op) (c (eql (find-system :cl-bench)))) |
|---|
| 87 | (operate 'load-op :cl-bench :force t)) |
|---|
| 88 | (defmethod perform ((o test-op) (c (eql (find-system :cl-bench)))) |
|---|
| 89 | (funcall (intern (symbol-name 'run) :abcl.test.cl-bench))) |
|---|
| 90 | |
|---|
| 91 | ;;; Build ABCL from a Lisp. |
|---|
| 92 | ;;; aka the "Lisp-hosted build system" |
|---|
| 93 | ;;; Works for: abcl, sbcl, clisp, cmu, lispworks, allegro, openmcl |
|---|
| 94 | (defsystem :build-abcl :components |
|---|
| 95 | ((:module build :pathname "" :components |
|---|
| 96 | ((:file "build-abcl") |
|---|
| 97 | (:file "customizations" :depends-on ("build-abcl")))))) |
|---|
| 98 | |
|---|
| 99 | |
|---|
| 100 | |
|---|