The attached patch adds a new option to DEFSYSTEM. This option is<br><br>:TESTS test-list<br><br>test-list = (:system system-name) | function-name<br>system-name = keyword | string<br>function-name = symbol | string<br><br>

The function name is a string designator that denotes a function with no arguments to be called. This string will be read using the standard I/O syntax only when the test is executed. This ensures that the mechanism works once the appropriate dependencies are loaded.<br>

The system name denotes a system that will be loaded when the TEST-OP operation is invoked. <br><br>The patch can be improved with some tests done when executing DEFSYTEM instead of what it does now, which is to signal an error once the test is performed.<br>

<br>The usual example follows.<br><br>foo.asd:<br><br>(defsystem :foo<br>    :tests ((:system "faa"))<br>    :components ((:file "foo")))<br><br>faa.asd:<br><br>(defsystem :faa<br>    :tests ("faa::run-tests")<br>

    :components ((:file "faa")))<br><br>foo.lisp:<br><br>(defpackage "FOO")<br><br>(in-package "FOO")<br><br>(defun my-cos (a)<br>  (cos a))<br><br>faa.lisp:<br><br>(defpackage "FAA")<br>

<br>(in-package "FAA")<br><br>(defun run-tests ()<br>  (format t "~&;;;~%;;; MY-COS signals errors: ~A~%;;;"<br>          (handler-case (progn (foo::my-cos 'a) 'no)<br>            (error (c) 'yes))))<br>

<br><br clear="all"><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://tream.dreamhosters.com">http://tream.dreamhosters.com</a><br>