Commit Graph

11 Commits

Author SHA1 Message Date
Jeff Young d094f86b1a Finish module cleanup (except for xpms). 2020-11-14 22:00:12 +00:00
Jeff Young 61bca4aaa4 A bit of "module" erradication, nameing conventions, and formatting. 2020-11-14 21:21:54 +00: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
John Beard 2ec4ceffbd Reinstate "QA: Tweak boost print helper macro""
This reverts commit 3afea91088.

This was actually not the issue, even though it seemed to trigger the
issue.
2019-05-24 13:23:51 +01:00
John Beard 3afea91088 Revert "QA: Tweak boost print helper macro"
This reverts commit 593b7cd6a1.

This causes breakage on MSVC. I am not sure sure why, but
this is not that important, so just back it out.
2019-05-23 23:31:03 +01:00
John Beard 593b7cd6a1 QA: Tweak boost print helper macro
By making the caller use the "namespace" keyword, the formatter
is given the right indentation hints.

Also makes it clearer synatactically. One day, this will be a
namespace alias (needs GCC 7).
2019-05-23 14:37:35 +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
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 c5effadb2a QA: Fix OPT::has_value error
boost::optional doesn't always have has_value, but it does always
have the bool operator.
2019-04-17 13:20:11 +01:00
John Beard 4bd661add7 QA: Add test on GetLayerName function
This adds a test to the recent GetLayerName function, and moves
it to the base.h file for re-use for any code that needs a
layer name.

This test covers the case that caused lp:1824750 [1].

[1]: https://bugs.launchpad.net/kicad/+bug/1824750
2019-04-17 10:52:56 +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