1CMAKE_MINIMUM_REQUIRED(VERSION 3.4) 2PROJECT(guix_demo_test) 3INCLUDE(DART) 4 5ENABLE_TESTING() 6 7#list test 8SET(TEST_FILE_LIST "") 9FILE(GLOB_RECURSE TEST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../../samples/*.gxp") 10LIST(APPEND TEST_FILE_LIST ${TEST_FILE}) 11FILE(GLOB_RECURSE TEST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../../test/example_internal/*.gxp") 12LIST(APPEND TEST_FILE_LIST ${TEST_FILE}) 13FILE(GLOB_RECURSE TEST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../../../tutorials/*.gxp") 14LIST(APPEND TEST_FILE_LIST ${TEST_FILE}) 15 16#add test 17FOREACH(TEST_FILE ${TEST_FILE_LIST}) 18 FILE(RELATIVE_PATH TEST_NAME "${CMAKE_CURRENT_SOURCE_DIR}/../../../" ${TEST_FILE}) 19 ADD_TEST(${TEST_NAME} python ${CMAKE_CURRENT_SOURCE_DIR}/test_main.py -p ${TEST_FILE} -t --debug) 20 SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES TIMEOUT 600) 21ENDFOREACH()