fix `python2 setup.py build` problem when setup.cfg ends with CRLF
[liba.git] / lua / test / CMakeLists.txt
blob91436cf0d46be7d192882a16a81db9fbf9de01d5
1 function(unittest source name)
2   set(ARGS)
4   foreach(arg ${ARGN})
5     get_filename_component(ext ${arg} EXT)
7     if(NOT ext OR IS_ABSOLUTE ${arg})
8       list(APPEND ARGS ${arg})
9     else()
10       list(APPEND ARGS ${CMAKE_CURRENT_BINARY_DIR}/${arg})
11     endif()
12   endforeach()
14   add_test(NAME lua_${name} WORKING_DIRECTORY ${WORKING_DIRECTORY}
15     COMMAND ${LUA_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/${source}.lua ${ARGS}
16   )
17   set_tests_properties(lua_${name} PROPERTIES TIMEOUT 30)
18 endfunction()
20 unittest(a a a.log)
22 unittest(complex complex)
24 unittest(crc8 crc8)
26 unittest(crc16 crc16)
28 unittest(crc32 crc32)
30 unittest(crc64 crc64)
32 unittest(hpf hpf)
34 unittest(lpf lpf)
36 unittest(mf mf)
38 unittest(pid pid)
40 unittest(pid_fuzzy pid_fuzzy)
42 unittest(pid_neuro pid_neuro)
44 unittest(tf tf)
46 unittest(trajbell trajbell)
48 unittest(trajpoly3 trajpoly3)
50 unittest(trajpoly5 trajpoly5)
52 unittest(trajpoly7 trajpoly7)
54 unittest(trajtrap trajtrap)
56 unittest(version version)