Commit Graph

42 Commits

Author SHA1 Message Date
Tomasz Wlostowski d24e0ea7a0 qa: fix build script 2020-10-07 17:43:12 +02:00
Tomasz Wlostowski bd27d38d9a DRAW_PANEL_GAL: added DebugOverlay() method, creating a temporary overlay for drawing debug graphics 2020-10-07 16:36:37 +02:00
Tomasz Wlostowski e1af46d099 qa: temporarily disable test_gal_pixel_aligmnent due to unfinished changes in PCB_TEST_FRAME_BASE 2020-09-08 01:31:42 +02:00
Tomasz Wlostowski fc58c4a20e drc_proto: netclass wip 2020-09-08 01:31:42 +02:00
Tomasz Wlostowski 9401165e6c qa: temporarily disable libeval_compiler_test 2020-07-29 23:14:34 +02:00
Tomasz Wlostowski abe6ccf97e common: re-enable libeval_compiler and DRC proto test (fixed missing file issues) 2020-07-29 23:14:03 +02:00
Ian McInerney 7b705af038 Refactor common QA components to create a single common library
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.
2020-07-18 16:21:15 +01:00
Ian McInerney 6672efdf2c Disable DRC prototype by default 2020-07-06 00:55:36 +01:00
Tomasz Wlostowski bd19892cd0 qa/drc_proto: clearance test seems to work with conditional rules, need to clean up & add reporting 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski b82ec2161f libeval_compiler: initial version 2020-07-05 22:44:38 +02:00
John Beard f4ba3cd910 QA: Add build-time option to enable XML output from tests
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.
2019-04-18 10:59:06 +01:00
John Beard 4214437d18 QA: Only build kicad2step tests if the lib exists
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
2019-04-18 10:13:17 +01:00
Jeff Young 3a8ffd66ca Disable kicad2step test until compile issues are fixed.
(Is this perhaps because I don't have OCE enabled so the main
kicad2step files aren't being built?)
2019-04-17 23:59:10 +01:00
John Beard 45aa514591 QA: Allow to build tests manually if disabled
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
2019-04-17 18:00:40 +01:00
John Beard 03214b5dea Sexpr/QA: Split out the sexpr classes into a reusable lib and test
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.
2019-04-17 10:52:56 +01:00
Tomasz Włostowski bbee30671a gal: pixel alignment hacks, works for Retina display too now.
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
2019-02-16 20:03:13 +01:00
John Beard adddc41bc5 QA: Reinstate polygon_triangulation utility
This utility has been disabled since the eeschema GAL merge. It
can be reinstated as part of the qa_pcbnew_tools framework.
2019-01-29 08:15:51 -05:00
John Beard 11745f8f44 QA: Move contents qa_shape_poly_set_refactor to qa_common
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.
2019-01-29 08:15:44 -05:00
John Beard 6729842441 QA: Reinstate polygon_generator as a sub-util of qa_pcbnew_tools
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.
2019-01-24 13:01:44 -05:00
John Beard e8afb14046 QA: Move PCB parse util to combined tools exec
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>
2019-01-23 13:27:52 -05:00
John Beard d7563c55c4 QA: Pcbnew utility tools: DRC tool
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.
2019-01-23 13:27:52 -05:00
John Beard 8297ab24e4 DRC: Break out courtyard overlap function
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.
2019-01-23 13:27:52 -05:00
John Beard 267e17d539 QA: Add a generic utility tool executable.
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.
2019-01-22 09:04:38 -05:00
Seth Hillbrand da295a355f qa: Moving eeschema qa to main qa folder 2019-01-09 21:43:23 -08:00
John Beard 1ae6fc78a6 QA: Add pcbnew unit tests CMake subdir
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
2019-01-07 15:14:37 +01:00
Seth Hillbrand 8f11a2133e Revert "QA: Add a generic utility tool executable."
This reverts commit 502306314e.
2019-01-06 16:17:44 -08:00
John Beard 81bac449d3 QA: Add unit tests on the Pcbnew library
This now allows code under /pcbnew to be tested.

A first test of the GRAPHICS_IMPORT_MGR is added.
2019-01-06 07:55:36 -08:00
John Beard 502306314e QA: Add a generic utility tool executable.
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.
2019-01-06 07:51:23 -08:00
John Beard ee819216e2 QA: Make a separate unit test utils library, COLOR4D tests
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.
2018-11-08 14:40:42 -05:00
John Beard acd103631b QA: PCB file input parse test program (fuzzable)
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.
2018-10-22 12:32:24 -04:00
Tomasz Wlostowski e439b17fa1 eeschema-gal: make sure all other Kicad apps compile after eeschema gal hacks 2018-10-09 11:08:52 +01:00
John Beard 9c78ef5784 QA: Make a generic common test suite
* 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.
2018-09-26 09:32:18 -04:00
John Beard 265c882320 QA Geometry: New test suite for generic geometric tests
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.
2018-07-27 08:57:50 -04:00
John Beard e84d1d169c QA: Rename geometry to shape_poly_set_refactor
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.
2018-07-27 08:57:43 -04:00
John Beard 79e4e767e9 QA: Add python test as a Ctest test rather than build target 2018-07-27 08:57:34 -04:00
Tomasz Włostowski fa31d5308a Sample tool for generating board geometyr as polygons 2017-12-05 14:54:57 +01:00
Tomasz Włostowski 316ddadec1 pcbnew: Optimized zone filling algorithm. 2017-12-05 14:54:57 +01:00
Tomasz Włostowski b945d2a708 cleanup: replace CLASS_MIRE with CLASS_PCB_TARGET for naming clarity 2017-11-03 20:02:06 +01:00
Alejandro García Montoro cc7825d00b Tests CPolyLine -> SHAPE_POLY_SET refactor.
Adds BOOST tests to the qa folder included in the geometry subdirectory.
The tests check whether the refactored code is consistent with the
legacy code. They also check some of the new code, as the family of
ITERATOR classes.
2017-03-24 10:43:47 +01:00
Wayne Stambaugh b04f18b245 CMake: remove OpenSSL download and build dependency code.
* Removed some left over OSX_DEP_BUILDER code missed in my previous commit.
2015-12-03 10:59:02 -05:00
Marco Serantoni a2483d48f3 [MacOSX] Fixing qa, thanks Miguel Angel for the feedback 2014-02-08 00:40:11 +01:00
Miguel Angel Ajo 15bfac3f4e Moved QA to root. 2014-02-02 22:50:45 +01:00