← Back to team overview

kicad-developers team mailing list archive

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

 

Tom,

I also forgot to mention there were tabs in the CMakeLists.txt file.

Cheers,

Wayne

On 9/7/2016 12:17 PM, Tomasz Wlostowski wrote:
> Hi,
> 
> This patch adds possibility to build C++ tests for pcbnew, using
> Boost.Test framework. I intended it primarily to make tests for the P&S,
> which I used to develop out-of-tree before.
> 
> Since Kicad's codebase is rather monolithic, testing/refactoring
> anything drags in pretty much everything else in the code as a
> dependency.  This causes long rebuild and linking times, which I find
> very annoying. Also, while developing new features, most of the time is
> spent linking pcbnew and clicking in the GUI to trigger the particular
> feature.
> 
> For that reason I decided to link all the test cases directly to the
> _pcbnew_kiface library and skip pcbnew's dependency scanning when
> building tests. I'm also preparing a bare PCB test window for verifying
> interactive/graphical operations without rebuilding pcbnew as a whole app.
> 
> I've attached the patch (set the KICAD_BUILD_TESTS=ON option to enable).
> There's one trivial unit test included as an example. Let me know if
> such solution would be acceptable.
> 
> Cheers,
> Tom
> 
> 
> 
> _______________________________________________
> 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
> 


Follow ups

References