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 ) if( KICAD_SCRIPTING_MODULES )
# build target that runs the QA tests through scripting # Test that runs the QA tests through scripting
add_custom_target( qa add_test( NAME qa_python
COMMAND PYTHONPATH=${CMAKE_BINARY_DIR}/pcbnew${PYTHON_QA_PATH} ${PYTHON_EXECUTABLE} test.py COMMAND ${PYTHON_EXECUTABLE} test.py
COMMENT "running qa"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
) )
set_property( TEST qa_python
PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/pcbnew${PYTHON_QA_PATH}"
)
endif() endif()