bzip2/runtest.cmake
Gabi Davar 978f8ee190 add cmake build system
* fix a few 64bit warnings
* remove some really old stuff
2014-06-21 15:26:00 +03:00

20 lines
502 B
CMake

message("TEST_PROG=${TEST_PROG}")
message("OUTPUT=${OUTPUT}")
execute_process(
COMMAND ${TEST_PROG} ${ARGUMENTS}
RESULT_VARIABLE HAD_ERROR
INPUT_FILE ${INPUT}
OUTPUT_FILE ${OUTPUT}
)
if(HAD_ERROR)
message(FATAL_ERROR "Test failed - ERROR in execute process!!!")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E compare_files
${OUTPUT} ${EXPECTED}
RESULT_VARIABLE DIFFERENT)
if(DIFFERENT)
message(FATAL_ERROR "Test failed - files differ")
endif()