* Add Boost::locale explicetly to the CMake since nanoodbc requires it
* Don't let nanoodbc add all Boost libraries to the link line, since it
is used in common, and it was pulling the unit test framework into
common then.
It fixes a link issue on W10/msys2 when building some .exe files
not related to QA tests, but have the unit_test_framework library linked
without this change..
Follow-up after the KIBIS and KIBIS GUI merge requests.
- Move KIBIS from Pcbnew to Eeschema space,
- Make KIBIS obtain the Ku/Kd coefficients via the `SPICE_SIMULATOR` class instead of calling the `ngspice` executable via `system()`,
- Allow to toggle between differential and single-ended model in the GUI,
- Various GUI fixes and improvements.
Adds Tom's internal P&S debugging tool. This is a work in progress and the code is quite messy for the moment, but I can't keep it in private branches forever and waste time rebasing it.
Note: experimental and *very unclean* code. Use at your own risk.
This moves the program-specific code (e.g. BIU files) into
the program tests.
Also, create title_block.cpp to break a dependency that pulled
in eda_text.cpp when using the TITLE_BLOCK object.
This allows CI tools to get machine-readable test reports.
By default, this is off - when you test normally, you probably
want the regular console spew.
Boost tests use the in-built Boost test command line options.
The Python tests take an --xml parameter and output the tests
there.
If neither OCC or OCE is available, the kicad2step_lib
target is not created, so the unit tests also cannot
be built. Detect missing libs and abort the test
target creation in that case.
Reverts (and fixes): 3a8ffd66c
Add a new CMake target, qa_all, which builds all
tests, tools and their deps.
Then, when KICAD_BUILD_QA_TESTS is set OFF, remove tests
and tools from the ALL target, so `make all` doesn't include
these builds.
This means even when you turn the KICAD_BUILD_QA_TESTS option
off, you still have the option to:
* Build individual tests: `make qa_pcbnew`
* Build all tests: `make qa_all_tests`
* Build all tools: `make qa_all_tools`
* Build all QA executables: `make qa_all`
This also will provide a place to hang extra logic for test routine
wrangling (e.g. by CI tools)
Update the "Compiling KiCad" dev docs.
Also, CMakeModules .cmake files should not be excluded from git
The SEXPR class is a useful general-purpose S-Expression library
class and can (maybe) be used else where. It also should get
test coverage, as even if noone else uses it, it's critical for the
kicad2step exporter.
Also add some test coverage for some kicad2step routines. For now,
they're not useful outside kicad2step, but they are at least a useful
reference for S-Expression parsing.
gal: pixel alignment for Cairo.
gal: pixel alignment for OpenGL
Cleanup of pixel alignment patches
gal/opengl: more pixel alignment patches:
- works on Retina displays now
- pixel alignment for circles
- correct 1-pixel strokes
- fixed unfinished 1-pixel line ends
GAL: Restore antialiasing options in Cairo
GAL: Fix arc drawing
Removes DrawArcSegment, which drew arcs whose edge was optionally
stroked (a feature that we did not use). Fixes Cairo arc drawing issue
where arcs were not visible in pcbnew.
gal: further cleanup
gal: removed unused shader parameter
The "refactor" element of qa_shape_poly_set_refactor has been
previously removed, so these tests are now just regular tests on
libcommon classes. These can therefore be moved to qa_common
and the qa_shape_poly_set_refactor unit test suit can finally be
totally removed.
This program has been disabled for some time, but it's not
broken (even if the CMake was!).
Merging into the pcbnew_tools QA program reduces the CMake burden
and puts this tool in the same place as the others.
This means all the current Pcbnew utilities are all in a single
executable.
The tool is now run by:
$ qa/pcbnew_tools/qa_pcbnew_tools pcb_parser <same arguments as before>
Add a tool that allows a user to run DRC functions
on a given KiCad PCB file.
The first available functions are the courtyard functions.
Also move most of the utility program logic into qa_util for
better reusability.
Introduce the concept of a DRC_PROVIDER which allows
to separate the various DRC functions to their own
areas. This allows, amongst other things, a slimmer core
DRC class, and allows DRC functions to be separately testable.
The courtyard DRCs (overlap, missing and malformed)
are the first victims, so instrumentation can be added to this function.
Add some unit tests on this DRC function, as well a few re-usable PCB-based
utility functions in a library (qa_pcbnew_utils) that could be shared between
unit tests and other utilities.
The intention here is to make it possible to wrap up many of the
KiCad utility tools into a single executable. This reduces link times
as well as the duplication of CMake files needed to build very
similar tools.
This particular tool should be suitable for any code in common,
code in pcbnew and other end-executables probalby will need an
analagous version linked to the relevant kiface.
The first tool is the coroutine_example.cpp test case, which
can be useful when learning, debugging or porting the coroutine
infrastructure.
Also modify the linkage of kiface objects, as this is not
supported by older CMake versions.
This was accidentally removed with the reversion of the application
of the wrong patch (8f11a2133).
QA: fix object files
The intention here is to make it possible to wrap up many of the
KiCad utility tools into a single executable. This reduces link times
as well as the duplication of CMake files needed to build very
similar tools.
This particular tool should be suitable for any code in common,
code in pcbnew and other end-executables probalby will need an
analagous version linked to the relevant kiface.
The first tool is the coroutine_example.cpp test case, which
can be useful when learning, debugging or porting the coroutine
infrastructure.
This includes:
* Linkage against the Boost unit test libs
* Configuration of the Boost libs
* A place for common generics "extras" for unit test harnesses
including
* A simple way to allow "expected-failure" tests (without
breaking Boost < 1.58, e.g. Ubuntu LTS)
* Moving some simple numeric predicates from the geom tests
to the utils library.
Expand unit test docs to describe the expected failures macro.
Add a few COLOR4D tests, including one with expected failures due
to a pre-existing bug. This will be fixed in a follow-up commit.
This adds a test program which can be used to test the
parsing of a given KiCad PCB file. This interface is
useful for both manual or automated debugging of given
files, as well as providing an interface suitable for
fuzz-testing tools.
Also adds to the testing docs to detail how fuzzing can
be used.
Also moves some useful re-usable code from io-benchmark
to a new library qa_utils, which can contain code that
isn't need in the actual KiCad libs.
* Renames /qa/common to /qa/qa_utils, as it is not to do with /common
* Renames /qa/geometry to /qa/common
* Put existing geometry tests into a subdirectory of /qa/common, to
echo the layout of the main tree.
The intention is to provide a place to put tests of other libcommon
code in the /qa/common suite.
This is the first test for a generic test suite for geometric functions.
The tests run are for fillet corners of SHAPE_POLY_SETS.
Previously, SHAPE_POLY_SET::Fillet was tested against CPolyLine::Fillet
to ensure compatibility. However, thse two functions now have different
interfaces and are not directly comparable. Also, this depended on
CPolyLine::Fillet being correct, which was not tested.
Instead, test SHAPE_POLY_SET::Fillet using tests against geometric
constraints, independent of any other fillet implementation.
This test is not really concerned with generic geometric code testing,
but rather the correctness of a refactoring effort.
Rename it make this clearer, and also to make way for generic geometry tests.