rename target name a$tool to afmt.$lang
[liba.git] / python / CMakeLists.txt
bloba1a81ee4b75e3288f4fc2425c30e438e724bb76c
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 py_${name} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
15     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test/${source}.py ${ARGS}
16   )
17 endfunction()
19 unittest(a a a.log)
21 unittest(crc crc)
23 unittest(hpf hpf)
25 unittest(lpf lpf)
27 unittest(mf mf)
29 unittest(pid pid)
31 unittest(pid_fuzzy pid_fuzzy)
33 unittest(pid_neuro pid_neuro)
35 unittest(poly poly)
37 unittest(tf tf)
39 unittest(trajbell trajbell)
41 unittest(trajpoly3 trajpoly3)
43 unittest(trajpoly5 trajpoly5)
45 unittest(trajpoly7 trajpoly7)
47 unittest(trajtrap trajtrap)
49 unittest(version version)