create regress_simple for JavaScript
[liba.git] / java / test / CMakeLists.txt
blob96a4447dcdfd9de59b03713d8893870dd8be55a3
1 set(JAVA_EXECUTABLE ${Java_JAVA_EXECUTABLE} -ea -Djava.library.path=.)
3 function(building target)
4   add_jar(java.test.${target} INCLUDE_JARS ajar
5     SOURCES _${target}.java ${SOURCES}
6     ENTRY_POINT _${target}
7     OUTPUT_NAME ${target}
8   )
9 endfunction()
11 function(unittest target)
12   set(ARGS)
14   foreach(arg ${ARGN})
15     get_filename_component(ext ${arg} EXT)
17     if(NOT ext OR IS_ABSOLUTE ${arg})
18       list(APPEND ARGS ${arg})
19     else()
20       list(APPEND ARGS ${CMAKE_CURRENT_BINARY_DIR}/${arg})
21     endif()
22   endforeach()
24   add_test(NAME jar_${target} WORKING_DIRECTORY ${WORKING_DIRECTORY}
25     COMMAND ${JAVA_EXECUTABLE} -jar ${CMAKE_CURRENT_BINARY_DIR}/${target}.jar ${ARGS}
26   )
27   set_tests_properties(jar_${target} PROPERTIES TIMEOUT 30
28     FAIL_REGULAR_EXPRESSION "ERROR;error"
29   )
30 endfunction()
32 building(a)
33 unittest(a a.log)
35 building(mf)
36 unittest(mf)
38 building(crc)
39 unittest(crc)
41 building(hpf)
42 unittest(hpf)
44 building(lpf)
45 unittest(lpf)
47 building(pid)
48 unittest(pid)
50 building(pid_fuzzy)
51 unittest(pid_fuzzy)
53 building(pid_neuro)
54 unittest(pid_neuro)
56 building(tf)
57 unittest(tf)
59 building(trajpoly3)
60 unittest(trajpoly3)
62 building(trajpoly5)
63 unittest(trajpoly5)
65 building(trajpoly7)
66 unittest(trajpoly7)
68 building(trajtrap)
69 unittest(trajtrap)
71 building(version)
72 unittest(version)