set variables before executing the "test-op"
Stelian Ionescu
sionescu at cddr.org
Tue Sep 6 13:03:15 UTC 2016
> It's probably wrong to set those settings from your .asd file, since they may be set or reset before your project runs, or in between two runs.
> If you actually care about those variables, define a function that sets them,
> and call it at the beginning of those files.
>
> If you have a lot of files, define a class for those files that does it in its perform method for basic-load-op.
>
> As for defining accessors before the packages are interned,
> to be executed by a function run *after* they are interned,
> you can use such idioms as:
> (setf (symbol-value (find-symbol* :*enable-colors* :prove.color) nil)
> Note that find-symbol* is defined by uiop, which is :use'd by :asdf-user.
>
> Alternatively, you could (load-system :prove) in your .asd file,
> but it's ugly.
This sounds like a good moment to come up with an interface between test-system and the test suite runner, so that you can pass arguments to the test runner directly through asdf:test-system. Using dynamic variables for this use case is a bad idea.
--
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
More information about the asdf-devel
mailing list