| 1 |
greg |
1.1 |
include(setup_paths.cmake)
|
| 2 |
|
|
file(WRITE ${office_dir}/test/raytest_rtrace.in
|
| 3 |
|
|
"-23 24.6 5.8 0 1 0
|
| 4 |
|
|
")
|
| 5 |
|
|
execute_process(
|
| 6 |
|
|
COMMAND rtrace${CMAKE_EXECUTABLE_SUFFIX} -ab 1 test/raytest_model.oct
|
| 7 |
|
|
WORKING_DIRECTORY ${office_dir}
|
| 8 |
|
|
INPUT_FILE test/raytest_rtrace.in
|
| 9 |
|
|
OUTPUT_FILE test/raytest_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 ${office_dir}/test/raytest_rtrace.out test_output)
|
| 17 |
|
|
if(test_output MATCHES "SOFTWARE= RADIANCE")
|
| 18 |
|
|
message(STATUS "passed")
|
| 19 |
|
|
else()
|
| 20 |
|
|
message(STATUS "failed")
|
| 21 |
|
|
endif()
|