diff --git a/qa/CMakeLists.txt b/qa/CMakeLists.txt index 7bbfcbee52..9ee379acc5 100644 --- a/qa/CMakeLists.txt +++ b/qa/CMakeLists.txt @@ -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()