CMAKE_MINIMUM_REQUIRED(VERSION 3.4) PROJECT(guix_demo_test) INCLUDE(DART) ENABLE_TESTING() #list test SET(TEST_FILE_LIST "") FILE(GLOB_RECURSE TEST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../../samples/*.gxp") LIST(APPEND TEST_FILE_LIST ${TEST_FILE}) FILE(GLOB_RECURSE TEST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/example_internal/*.gxp") LIST(APPEND TEST_FILE_LIST ${TEST_FILE}) FILE(GLOB_RECURSE TEST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../../tutorials/*.gxp") LIST(APPEND TEST_FILE_LIST ${TEST_FILE}) #add test FOREACH(TEST_FILE ${TEST_FILE_LIST}) FILE(RELATIVE_PATH TEST_NAME "${CMAKE_CURRENT_SOURCE_DIR}/../../../" ${TEST_FILE}) ADD_TEST(${TEST_NAME} python ${CMAKE_CURRENT_SOURCE_DIR}/test_main.py -p ${TEST_FILE} -t --debug) SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES TIMEOUT 600) ENDFOREACH()