2017-02-27 10:07:52 +00:00
|
|
|
#
|
|
|
|
# This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
#
|
|
|
|
# Copyright (C) 2017 CERN
|
|
|
|
# @author Alejandro García Montoro <alejandro.garciamontoro@gmail.com>
|
2022-04-17 21:23:22 +00:00
|
|
|
# Copyright (C) 2022 KiCad Developers, see AUTHORS.txt for contributors.
|
2017-02-27 10:07:52 +00:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, you may find one here:
|
|
|
|
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
# or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
# or you may write to the Free Software Foundation, Inc.,
|
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
|
2019-01-09 14:35:42 +00:00
|
|
|
|
2017-02-27 10:07:52 +00:00
|
|
|
include_directories( BEFORE ${INC_BEFORE} )
|
|
|
|
|
2020-05-19 02:40:13 +00:00
|
|
|
include_directories(
|
|
|
|
${CMAKE_SOURCE_DIR}
|
|
|
|
${CMAKE_SOURCE_DIR}/include
|
|
|
|
${CMAKE_SOURCE_DIR}/pcbnew
|
2022-02-11 17:57:28 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/qa/mocks/include
|
2021-11-30 23:33:21 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/qa/qa_utils
|
2020-05-19 02:40:13 +00:00
|
|
|
${INC_AFTER}
|
|
|
|
)
|
|
|
|
|
2020-04-17 23:46:01 +00:00
|
|
|
set( QA_EESCHEMA_SRCS
|
2019-04-23 08:18:15 +00:00
|
|
|
# need the mock Pgm for many functions
|
2022-02-11 17:57:28 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/qa/mocks/kicad/common_mocks.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/qa/mocks/eeschema/mock_eeschema.cpp
|
2019-04-23 08:18:15 +00:00
|
|
|
|
2019-04-02 15:35:25 +00:00
|
|
|
eeschema_test_utils.cpp
|
2020-02-28 21:55:51 +00:00
|
|
|
uuid_test_utils.cpp
|
2019-04-02 15:35:25 +00:00
|
|
|
|
2019-04-02 12:36:12 +00:00
|
|
|
# The main test entry points
|
2020-11-14 22:00:12 +00:00
|
|
|
test_module.cpp
|
2019-04-02 12:36:12 +00:00
|
|
|
|
2019-12-30 18:28:00 +00:00
|
|
|
# Base internal units (1=100nm) testing.
|
|
|
|
test_sch_biu.cpp
|
|
|
|
|
2020-07-16 14:11:31 +00:00
|
|
|
# Shared between programs, but dependent on the BIU
|
2022-03-18 20:05:15 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/qa/unittests/common/test_format_units.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/qa/unittests/common/test_array_options.cpp
|
2020-07-16 14:11:31 +00:00
|
|
|
|
2021-02-04 19:16:34 +00:00
|
|
|
sch_plugins/altium/test_altium_parser_sch.cpp
|
|
|
|
|
2019-04-02 12:36:12 +00:00
|
|
|
test_eagle_plugin.cpp
|
2019-04-23 08:18:15 +00:00
|
|
|
test_lib_part.cpp
|
2020-05-19 02:40:13 +00:00
|
|
|
test_netlists.cpp
|
2021-11-29 21:19:43 +00:00
|
|
|
test_ee_item.cpp
|
2022-04-19 21:43:32 +00:00
|
|
|
test_pin_numbers.cpp
|
2019-04-23 08:18:15 +00:00
|
|
|
test_sch_pin.cpp
|
2019-06-25 23:39:58 +00:00
|
|
|
test_sch_rtree.cpp
|
2022-04-17 21:23:22 +00:00
|
|
|
test_sch_reference_list.cpp
|
2019-04-23 08:18:15 +00:00
|
|
|
test_sch_sheet.cpp
|
|
|
|
test_sch_sheet_path.cpp
|
2020-10-18 20:30:37 +00:00
|
|
|
test_sch_sheet_list.cpp
|
2020-04-16 16:43:50 +00:00
|
|
|
test_sch_symbol.cpp
|
2020-04-17 23:46:01 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
# Spice specific testing routine
|
|
|
|
if( KICAD_SPICE )
|
|
|
|
set( QA_EESCHEMA_SRCS
|
|
|
|
${QA_EESCHEMA_SRCS}
|
|
|
|
# Simulation tests
|
2022-03-05 23:49:25 +00:00
|
|
|
sim/test_ngspice_helpers.cpp
|
2020-04-17 23:46:01 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_executable( qa_eeschema
|
|
|
|
${QA_EESCHEMA_SRCS}
|
2019-04-02 12:36:12 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries( qa_eeschema
|
2022-01-02 02:21:49 +00:00
|
|
|
eeschema_kiface_objects
|
2019-04-02 12:36:12 +00:00
|
|
|
common
|
2020-05-19 02:40:13 +00:00
|
|
|
pcbcommon
|
2021-03-18 13:28:04 +00:00
|
|
|
scripting
|
2020-03-10 15:04:05 +00:00
|
|
|
kimath
|
2019-04-02 12:36:12 +00:00
|
|
|
qa_utils
|
2019-12-29 13:07:17 +00:00
|
|
|
markdown_lib
|
2019-04-02 12:36:12 +00:00
|
|
|
${GDI_PLUS_LIBRARIES}
|
|
|
|
${Boost_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
# Eeschema tests, so pretend to be eeschema (for units, etc)
|
|
|
|
target_compile_definitions( qa_eeschema
|
|
|
|
PUBLIC EESCHEMA
|
2019-04-02 15:35:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Pass in the default data location
|
|
|
|
set_source_files_properties( eeschema_test_utils.cpp PROPERTIES
|
2022-03-18 21:26:09 +00:00
|
|
|
COMPILE_DEFINITIONS "QA_EESCHEMA_DATA_LOCATION=(\"${CMAKE_SOURCE_DIR}/qa/data/eeschema\")"
|
2019-04-17 11:41:15 +00:00
|
|
|
)
|
|
|
|
|
2020-07-16 14:11:31 +00:00
|
|
|
kicad_add_boost_test( qa_eeschema qa_eeschema )
|
2020-04-19 20:13:21 +00:00
|
|
|
|