Running tests with test coverage enabled
Faré
fahree at gmail.com
Sat Oct 15 12:59:39 UTC 2016
I recommend that you write run tests, etc., in a separate process, as
orchestrated by a script that just after it loads ASDF
1- loads all the library code for which you do NOT want test coverage
2- turns on coverage
3- configures the asdf-output-translations to redirect object files
for those systems that you DO want coverage (and only those) to an
alternate location
4- load the rest of the code
5- runs the test
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
Reasons for existence are usually provided for things that don't exist;
they would be wasted on things which do. — Saul Gorn
On Sat, Oct 15, 2016 at 2:52 AM, Alexey Veretennikov
<txm.fourier at gmail.com> wrote:
> Anyone ? Is impossible to do or too hard?
> I see it as following:
> make a new operation which will:
> 1) compile the test cases
> 1) clean the test object (remove fasls of target system to test but not
> dependencies)
> 2) execute necessary startup code (set up the code coverage)
> 3) run testcases
> 4) perform teardown code (turn off the code coverage and collect stats etc)
>
> How could I achieve at least this?
>
> Alexey Veretennikov <txm.fourier at gmail.com> writes:
>
>> Hi all,
>>
>> Right now I'm running unit tests using Fukamachi's prove library:
>> (asdf/operate:test-system 'my-system).
>>
>> I want to run my tests generating the tests coverage of my system.
>>
>> For this I would like to have similar operation, but which will:
>> 1) turn on the code coverage in LispWorks (just call to some global
>> function)
>> 2) rebuild system which I want to test (in this case my-system), but
>> only (!) this system (not dependencies)
>> 3) run tests
>> 4) call coverage results processing function.
>> 5) on normal run (asdf/operate:test-system 'my-system) rebuild the
>> system without coverage.
>>
>> How could I proceed with this task?
>
> --
> Br,
> /Alexey
>
More information about the asdf-devel
mailing list