1 |
include(FindPerl) |
2 |
|
3 |
set(resources_dir "${CMAKE_SOURCE_DIR}/resources") |
4 |
set(rad_test_dir "${CMAKE_SOURCE_DIR}/test") |
5 |
|
6 |
### CONFIGURE TESTS |
7 |
|
8 |
configure_file(setup_paths.cmake.in setup_paths.cmake @ONLY) |
9 |
# configure these files so that they will be in the binary |
10 |
# directory. This will allow them to include setup_paths.cmake |
11 |
# from the binary directory and just use regular variables in the |
12 |
# configured files. |
13 |
configure_file(test_setup.cmake test_setup.cmake COPYONLY) |
14 |
configure_file(test_rtrace.cmake test_rtrace.cmake COPYONLY) |
15 |
configure_file(test_rpict.cmake test_rpict.cmake COPYONLY) |
16 |
configure_file(test_pcond.cmake test_pcond.cmake COPYONLY) |
17 |
configure_file(test_falsecolor.cmake test_falsecolor.cmake COPYONLY) |
18 |
configure_file(test_DC.cmake test_DC.cmake COPYONLY) |
19 |
configure_file(test_evalglare.cmake test_evalglare.cmake COPYONLY) |
20 |
|
21 |
### ADD TESTS |
22 |
|
23 |
add_test(test_setup ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/test_setup.cmake) |
24 |
|
25 |
add_test(test_rtrace ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/test_rtrace.cmake) |
26 |
set_tests_properties(test_rtrace PROPERTIES |
27 |
PASS_REGULAR_EXPRESSION "passed" |
28 |
FAIL_REGULAR_EXPRESSION "failed" |
29 |
) |
30 |
|
31 |
add_test(test_rpict ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/test_rpict.cmake) |
32 |
set_tests_properties(test_rpict PROPERTIES |
33 |
PASS_REGULAR_EXPRESSION "passed" |
34 |
FAIL_REGULAR_EXPRESSION "failed" |
35 |
) |
36 |
|
37 |
add_test(test_pcond ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/test_pcond.cmake) |
38 |
set_tests_properties(test_pcond PROPERTIES |
39 |
PASS_REGULAR_EXPRESSION "passed" |
40 |
FAIL_REGULAR_EXPRESSION "failed" |
41 |
) |
42 |
|
43 |
add_test(test_evalglare ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/test_evalglare.cmake) |
44 |
set_tests_properties(test_evalglare PROPERTIES |
45 |
PASS_REGULAR_EXPRESSION "passed" |
46 |
FAIL_REGULAR_EXPRESSION "failed" |
47 |
) |
48 |
|
49 |
|
50 |
if(PERL_FOUND) |
51 |
add_test(test_falsecolor ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/test_falsecolor.cmake) |
52 |
set_tests_properties(test_falsecolor PROPERTIES |
53 |
PASS_REGULAR_EXPRESSION "passed" |
54 |
FAIL_REGULAR_EXPRESSION "failed" |
55 |
) |
56 |
endif() |