← Back to team overview

kicad-developers team mailing list archive

Re: [RFC] [PATCH] simple C++ tests

 

Hi Michael,

On 12/06/2016 05:35 PM, Michael Steinberg wrote:
> Hello,
> 
> I played around a bit and settled on a quick&easy solution. For running
> the tests on windows binding to the shared libs is a problem with our
> default build, because we have separate output directories per target.
> Only after an install operation are they in one directory for proper
> library lookup. So I added an option to the kicad cmake script to output
> all targets to a single shared directory, this option is implicitly
> activated when unit tests are enabled on windows. It then also adds the
> boost.test dependency.

It sounds ok, I do not know how else it could be solved on Windows, at
least to be able to easily set up automatic testing.

> Everything else is just like I described in the last message: CTest can
> be used to run all the test executables, if you want boost.test
> verbosity, you can always run the tests from the command prompt.
> 
> Problem left would then be, how we set up the test targets. My initial
> thought would be to have one target per lib/executable. All tests
> related to the common library would then be combined to the
> "common-test" target for example.

I used to work with projects that had multiple small unit tests and it
was quite neat solution. Do you think it would be much harder to apply
the same rules here? If so, I would not mind having one-to-one relation
between targets and tests, especially that one can easily separate tests
using boost.test judging from the screenshot you posted.

Regards,
Orson

> Here's a screenshot for the targets, RUN_TESTS (CTest) output,
> boost.test output and the shared stage dir:
> https://s17.postimg.org/p5ktjhoe5/kicad_unit_tests.png
> 
> Am I making any sense? I might not be aware of all the things you expect
> from this.
> 
> Michael
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References