1find_program(LUAJIT luajit) 2find_program(BUSTED busted) 3 4if(LUAJIT) 5 add_test(NAME lua_test_clang WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 6 COMMAND ${TEST_WRAPPER} lua_test_clang sudo ${LUAJIT} test_clang.lua) 7 8 add_test(NAME lua_test_uprobes WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 9 COMMAND ${TEST_WRAPPER} lua_test_uprobes sudo ${LUAJIT} test_uprobes.lua) 10 11 add_test(NAME lua_test_dump WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 12 COMMAND ${TEST_WRAPPER} lua_test_dump sudo ${LUAJIT} test_dump.lua) 13 14 add_test(NAME lua_test_standalone WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 15 COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/test_standalone.sh) 16 17 if(BUSTED) 18 add_test(NAME lua_test_busted WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 19 COMMAND busted --lua=${LUAJIT} -m "${CMAKE_CURRENT_SOURCE_DIR}/../../src/lua/?.lua" -m "${CMAKE_CURRENT_SOURCE_DIR}/../../src/lua/?/init.lua;") 20 endif() 21endif() 22