1 |
include(setup_paths.cmake) |
2 |
file(WRITE ${test_output_dir}/rtrace.in |
3 |
"0 0 0 0 0 -1 |
4 |
") |
5 |
execute_process( |
6 |
WORKING_DIRECTORY ${test_output_dir} |
7 |
COMMAND rtrace${CMAKE_EXECUTABLE_SUFFIX} -ab 1 cornell_box.oct |
8 |
INPUT_FILE rtrace.in |
9 |
OUTPUT_FILE rtrace.out |
10 |
RESULT_VARIABLE res |
11 |
) |
12 |
if(NOT ${res} EQUAL 0) |
13 |
message(FATAL_ERROR "Bad return value from rtrace, res = ${res}") |
14 |
endif() |
15 |
|
16 |
file(READ ${test_output_dir}/rtrace.out test_output) |
17 |
if(test_output MATCHES "SOFTWARE= RADIANCE") |
18 |
message(STATUS "passed") |
19 |
else() |
20 |
message(STATUS "failed") |
21 |
endif() |