set variables before executing the "test-op"

Alexey Veretennikov txm.fourier at gmail.com
Tue Sep 6 10:58:46 UTC 2016


Hi all,

I am using cl-project to generate project skeleton for the library
including separate asd file for unit tests.
The test framework I use is the default for cl-project: prove.
Using this framework I would like to set some special variables to control
test execution _before_ running the asdf:test-system
i.e.
(setf prove.color:*enable-colors* nil)
(setf prove:*default-reporter* :tap)

But the problem is when I set them directly in .asd file, the CL reader
complains what the prove.color and prove packages do not exist (which is
true, since the prove dependency is not yet loaded).
I could set them in every test file, but I would like to set them globally.
How could I set them after the dependency to unit test library (prove) is
loaded and therefore package exists?

This is what I have in .asd file for tests:

:defsystem-depends-on (:prove-asdf)
:perform (test-op :after (op c)
(funcall (intern #.(string :run-test-system) :prove-asdf) c)
(asdf:clear-system c)))

Br
/Alexey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20160906/de0d5143/attachment.html>


More information about the asdf-devel mailing list