Commit Graph

15 Commits

Author SHA1 Message Date
Wayne Stambaugh 8cc80e3b35 Add unit test for testing LIB_ARC objects.
Added tests for calculating radius angles and arc mid point.
2020-03-10 11:04:05 -04:00
Jeff Young 9ded76bcad Update tests to UUIDs.
Fixes https://gitlab.com/kicad/code/kicad/issues/3939

Fixes https://gitlab.com/kicad/code/kicad/issues/3958
2020-02-28 22:06:14 +00:00
Ian McInerney 06c979dfaa Convert all CMake paths to absolute instead of relative
It is cleaner and safer to handle the include and source paths
as absolute from the source directory instead of relative to every
path.
2020-01-22 23:27:20 +00:00
Seth Hillbrand 6e5e453d0d Replace EESchema DLIST
This moves EESchema DLIST structures to rtree.  These changes are more
fundamental than the pcbnew changes from 9163ac543 888c01d11 d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
2020-01-10 06:37:08 -08:00
Wayne Stambaugh aeb3281e27 Convert Schematic Internal Units to 100nm 2019-12-30 18:28:00 +00:00
jean-pierre charras 04aa45c25c qa_eeschema build: fix missing library in library link list.
The issue was created by my commit 19e92c9.
2019-12-29 14:07:17 +01:00
Simon Richter c8c3e1f96a Fix build order for generated headers and sources
This changes make_lexer() so that it no longer generates a custom target
but instead attaches the generated files to an existing one (so the first
argument now is the name of an existing library or executable, and it needs
to come after the add_library/add_executable call).

The generated source is no longer listed in the project sources, as it is
added by the function. The files are generated in the build tree rather
than the source tree, and the directory is added to the include path for
the respective project as well as exported to projects linking against it.

Generated files in subdirectories are somewhat supported, but need to be
referenced with the same name as they were generated (i.e. including the
subdirectory name).

Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643

Fixes: lp:1832357
* https://bugs.launchpad.net/kicad/+bug/1832357

Fixes: lp:1833851
* https://bugs.launchpad.net/kicad/+bug/1833851
2019-07-03 09:36:40 -04:00
Seth Hillbrand 172542cfc4 Enforce build order with qa system
The QA objects link to the direct kiface objects, which creates a second
dependency on the generated lexer files.  To ensure that the primary
apps are finished building them in a (potentially) different thread, we
set a false dependency on the final build product in the qa CMake.

Fixes: lp:1833851
* https://bugs.launchpad.net/kicad/+bug/1833851
2019-06-23 12:52:20 -07:00
John Beard 7ebda0247f Common: Remove legacy_gal library, fold into common
Return the EDA_DRAW_FRAME class back to common, whence it came (before it was
duplicated into legacy_wx and legacy_gal). Now there is only one
implementation (the GAL one), it doesn't need to be in a separate library.

This simplifies the dependencies for common lib users.
2019-06-10 18:56:57 +01:00
John Beard 840e08fa78 QA eeschema: add some tests
This adds a few tests on:

* LIB_PART
* SCH_PIN
* SCH_SHEET
* SCH_SHEET_PATH

These tests exercise some of the basic code paths in these classes
and show some of the expected behaviours.

None of these tests are particularly ground-breaking, but they
provide a starting point to build out further tests, and to ensure
the already-covered behaviour is stable.

It does expose some places where SCH_SHEET could probably use const.
2019-05-23 11:29:28 +01:00
John Beard 0617bffce0 Eeschema: build with object libraries
This is done to allow access to the eeschema library
internals for purposes of test and script access, as the
DLL library has highly restrictive -fvisibility settings
that otherwise prevent the tests being able to access 99.9%
of the eeschema library functions (only a single function
is APIEXPORT'ed, therefore that's the only test we can do).

Using object libraries is a bit of a hack, and makes for
a slower link when done for multiple targets, but with the currently
supported CMake versions, it's about as good as we can get.

A better solution in the longer term may be to break eeschema_kiface(_objects)
into many smaller libraries, each of which has a much more defined scope,
rather than one big interlinked amorphous lump. This has the advantage that
each module is testable in isolation, and we get better organisation of
inter-dependencies in the codebase.

Then, the kiface DLL will gather these sub-libs and present what
is needed on the visible DLL API. Thus, we get both a testable
suite of library functions, and a restricted kiface DLL interface.
2019-05-23 11:29:28 +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 88faac309f QA: Eagle test: look up test data in the source tree
Also provide a utility function to get this path, and
a way to override at run time to quickly sub in alternative
data.

The test itself is still broken, as this plugin won't accept
a call to Load() without a KiWay.
2019-04-02 18:26:33 +01:00
John Beard 4eb30f6b85 QA: Enable eeschema tests
Redesignate the eagle test as eeschema tests and build
more like the other unit tests.

Enable as a test in Ctest now that the test executes without
crashing.

The loading of the file with the hardocded part is still
not enabled, as this needs more infrastructure to support it.
2019-04-02 18:26:33 +01:00
Seth Hillbrand da295a355f qa: Moving eeschema qa to main qa folder 2019-01-09 21:43:23 -08:00
Renamed from eeschema/qa/CMakeLists.txt (Browse further)