ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/resources/cmake_tests/test_rpict.cmake
Revision: 1.2
Committed: Mon Jan 8 16:51:31 2018 UTC (6 years, 4 months ago) by greg
Branch: MAIN
CVS Tags: rad5R4, rad5R2, rad5R3, HEAD
Changes since 1.1: +5 -5 lines
Log Message:
Update to CMake build system from Rob G. and Alex S., adding test cases

File Contents

# Content
1 include(setup_paths.cmake)
2
3 # run rpict on the Cornell box
4 execute_process(
5 WORKING_DIRECTORY ${test_output_dir}
6 COMMAND rpict${CMAKE_EXECUTABLE_SUFFIX} -ab 1 -vf ${resources_dir}/cornell_box/cornell.vf ${test_output_dir}/cornell_box.oct
7 OUTPUT_FILE ${test_output_dir}/rpict_out.hdr
8 RESULT_VARIABLE res
9 )
10 if(NOT ${res} EQUAL 0)
11 message(FATAL_ERROR "Bad return value from rpict, res = ${res}")
12 endif()
13
14 # scan output file for valid header
15 file(READ ${test_output_dir}/rpict_out.hdr test_output)
16 if(test_output MATCHES "SOFTWARE= RADIANCE")
17 message(STATUS "passed")
18 else()
19 message(STATUS "failed")
20 endif()