[asdf-devel] ASDF test-op question

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Tue Oct 20 10:52:37 UTC 2009


On Mon, Oct 19, 2009 at 10:10 PM, Juan Jose Garcia-Ripoll
<juanjose.garciaripoll at googlemail.com> wrote:
> I attach a simple extension to ASDF's OPERATE that creates a log. The
> log is a list of objects, each one containing the operation that was
> performed, whether it failed, and the output of PERFORM. With that log
> it is easy to build a TEST function that parses only the log entries
> related to tests.

I forgot to add a patch containing the extension, which I now include
with a couple more files.

This version includes also an RT-TEST-OP which hacks around the
regression-test package. It is realy a hack,because this library is
not designed to have more than one test suite. What the operation does
is to load (not as a dependency but as per OPERATE) and then clear all
the variables from the test library. This forces the tests to be run
every time.

The idea is that one can write things like

(defsystem :my-package
  :components ((:file "my-package"))
  :in-order-to ((test-op (rt-test-op :my-package-test))))

without really writing our own methods. The different operations will
take care of using the appropriate regression test library.

The function TEST is invoked as in
   (asdf:test 'asdf:test-op :my-package)
and it filters the ASDF log looking for test operations and signalling
when all of them succeeded and returning the list of failed tests.

Problems:

- The interface to the RT library is a horrible hack
- ASDF decides that it has to run RT-TEST-OP for some reason I do not know.

Other than this, it works for the toy example I attach.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: application/octet-stream
Size: 6471 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20091020/a9949093/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: companion.zip
Type: application/zip
Size: 1174 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20091020/a9949093/attachment.zip>


More information about the asdf-devel mailing list