QA: Add python test as a Ctest test rather than build target

This commit is contained in:
John Beard 2018-07-09 15:03:02 +01:00 committed by Wayne Stambaugh
parent 370a412f49
commit df1fa37fd8
1 changed files with 8 additions and 6 deletions

View File

@ -1,12 +1,14 @@
if( KICAD_SCRIPTING_MODULES )
# build target that runs the QA tests through scripting
add_custom_target( qa
COMMAND PYTHONPATH=${CMAKE_BINARY_DIR}/pcbnew${PYTHON_QA_PATH} ${PYTHON_EXECUTABLE} test.py
COMMENT "running qa"
# Test that runs the QA tests through scripting
add_test( NAME qa_python
COMMAND ${PYTHON_EXECUTABLE} test.py
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
)
set_property( TEST qa_python
PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/pcbnew${PYTHON_QA_PATH}"
)
endif()