How to create an ABCL-specific test for ASDF (was Re: [asdf-devel] Patch for UIOP/UTILITY:ENSURE-FUNCTION)
Robert P. Goldman
rpgoldman at sift.info
Mon Nov 4 17:35:30 UTC 2013
Mark Evenson wrote:
> On Nov 4, 2013, at 15:46, Robert P. Goldman <rpgoldman at sift.info> wrote:
>
>> Faré wrote:
>>> If you can provide a simple test case to include in the test suite,
>>> that'd be great. I'm feeling too lazy and not concerned enough to
>>> write one. [My, didn't I resign as a maintainer?]
>> Yes, a test that simply reads a file out of a jar file, and fails on
>> older versions of ASDF would be very nice to have.
>
> Oh, such an ABCL specific test is quite easy: I guess I thought Faré was asking
> for something that ran on all implementations, which I didn’t quite understand.
>
> But I must confess I dont really understand how to insert it into the ASDF test
> suite cleanly.
>
> Should I be looking to add a foo.{script,lisp,asd} triple in the `asdf/test` directory
> with an assertion in foo.script?
You can certainly do this. If you prefer, you can also add only the
.script file and add your DEFSYSTEM (assuming you need one for the test)
into test-asd.asd -- Faré added this file to keep down the clutter.
It's entirely up to you. I find I can often reuse one of the .lisp
files that's already there. There are many that, when loaded, will just
cause a global variable to be bound to a particular value. So many of
the test scripts are of this form:
<perform actions that should cause a particular .lisp file to be loaded>
<assert something about the global variable in that .lisp file>
>
> How do I conditionalize the test to only be run on ABCL?
Probably the easiest would be to put the line
#-abcl
(leave-test "This test is only intended for ABCL." 0)
at the head of the .script file. Exiting with zero will cause the test
to automatically pass on all other lisps.
I'll be happy to help you get this installed if you can provide the key
bit -- a place where the test would fail if not for your recent patch.
Thanks!
r
More information about the asdf-devel
mailing list