[cl-unification-devel] implement ASDF testing
Marco Antoniotti
marcoxa at cs.nyu.edu
Mon Feb 14 10:59:58 UTC 2011
Looks good to me.
Cheers
--
Marco
On Feb 11, 2011, at 21:28 , Robert Brown wrote:
> I'd ilke to add the ability to test cl-unification by evaluating either of:
>
> (asdf:test-system 'cl-unification)
> (asdf:test-system 'cl-unification-test)
>
> The change involves adding one line:
>
> :in-order-to ((test-op (test-op :cl-unification-test)))
>
> to cl-unification.asd and adding the cl-unification-test.asd file below.
> Any objections?
>
> bob
>
> ==========
>
>
> ;;;; cl-unification-test.asd
>
>
> (in-package #:asdf)
>
> ;; Tests implemented using the ptester framework are run at *load* time, so
> ;; we tell ASDF that loading a file containing ptester code is never done.
> ;; This causes ASDF to run all the tests whenever ASDF:LOAD-SYSTEM or
> ;; ASDF:TEST-SYSTEM is called with argument CL-UNIFICATION-TEST.
>
> (defclass ptester-source-file (cl-source-file)
> ()
> (:documentation "A Common Lisp source file containing ptester code."))
>
> (defmethod operation-done-p ((operation load-op) (component
> ptester-source-file))
> nil)
>
>
> (in-package #:common-lisp-user)
>
> (defpackage #:cl-unification-test-system
> (:use #:common-lisp #:asdf))
>
> (in-package #:cl-unification-test-system)
>
> (defsystem #:cl-unification-test
> :depends-on (:cl-unification :ptester)
> :components
> ((:module "test"
> :components
> ((:ptester-source-file "unification-tests")))))
>
> _______________________________________________
> cl-unification-devel site list
> cl-unification-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/cl-unification-devel
>
--
Marco Antoniotti
More information about the cl-unification-devel
mailing list