On Mon, Oct 19, 2009 at 10:10 PM, Juan Jose Garcia-Ripoll juanjose.garciaripoll@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