← Back to team overview

kicad-developers team mailing list archive

Re: [PATCH] Pcbnew unit test framework

 

Le 07/01/2019 à 14:00, John Beard a écrit :
> Hi JP,
> 
> Sorry, I thought that issue was just a side effect of conflicted
> merges in these files, but maybe not. I had built this code on Linux
> GCC, Windows Msys2 and MSVC on Simon's Jenkins with no issues, so I'm
> working blind in trying to fix it.
> 
> I think it might be an issue with older CMakes, but I cannot test this
> as I do not know of a CI target I could use to check. I am rebuilding
> on Jenkins now, but since it takes an hour and doesn't even show the
> error, I'd like to know if I have also fixed it for you.
> 
> Here's an attempt to fix it (replaces prior patch).

Hi John,

This patch works.
make test works and shows only 3 tests:
$ make test
Running tests...
Test project E:/kicad-launchpad/testing_git/Build/Release
    Start 1: common
1/3 Test #1: common ...........................   Passed    0.09 sec
    Start 2: pcbnew
2/3 Test #2: pcbnew ...........................   Passed    0.14 sec
    Start 3: shape_poly_set_refactor
3/3 Test #3: shape_poly_set_refactor ..........   Passed    0.03 sec

100% tests passed, 0 tests failed out of 3


I also tried to re-add the line:
"pcbnew_kiface_objects"
in qa/pcbnew/CMakeLists.txt

I get this cmake error:
CMake Error at qa/pcbnew/CMakeLists.txt:66 (target_link_libraries):
  Target "pcbnew_kiface_objects" of type OBJECT_LIBRARY may not be linked
  into another target.  One may link only to INTERFACE, STATIC or SHARED
  libraries, or to executables with the ENABLE_EXPORTS property set.

and I have this error both with cmake 3.7 and a recent cmake 3.11 (on msys)

So it can be a cmake issue and/or a operating system issue.

> 
> What is the right way for me to check these patches are correct in
> future? It is frustrating to submit patches that break builds that I
> have no way to predict or detect, and I'm sure it frustrating for
> maintainers to waste so much time speculatively building patches and
> replying to emails with the failures.
> 
> Cheers,
> 
> John

Not easy...

I have 2 OS: W7 32 bits and Linux.
In fact I have 2 Linux installs:
* a "old" Kubuntu 14.04 LTS (using KDE) install (similar to our Jenkins
install: it allows me to fix some issues found by Jenkins).
* a more recent Ubuntu 16.04 LTS (using Unity) install to catch some
other issues (especially Unity specific)

And I already committed broken patches.

Of course, I cannot test OSX builds.

-- 
Jean-Pierre CHARRAS


Follow ups

References