mirror of
https://github.com/libjpeg-turbo/libjpeg-turbo.git
synced 2026-01-18 21:41:20 +01:00
Replace TJExample with IJG workalike programs
This commit is contained in:
@@ -40,7 +40,9 @@ file(GLOB FILES
|
||||
*_LOSSL*S_*.jpg
|
||||
croptest.log
|
||||
tjbenchtest*.log
|
||||
tjexampletest*.log)
|
||||
tjcomptest*.log
|
||||
tjdecomptest*.log
|
||||
tjtrantest*.log)
|
||||
|
||||
if(NOT FILES STREQUAL "")
|
||||
message(STATUS "Removing test files")
|
||||
|
||||
@@ -45,9 +45,6 @@ if(PRECISION EQUAL 8)
|
||||
endif()
|
||||
run_test(tjbenchtest "-precision;${PRECISION};-lossless")
|
||||
run_test(tjbenchtest "-precision;${PRECISION};-lossless;-alloc")
|
||||
if(PRECISION EQUAL 8)
|
||||
run_test(tjexampletest "")
|
||||
endif()
|
||||
if(WITH_JAVA)
|
||||
if(PRECISION EQUAL 8 OR PRECISION EQUAL 12)
|
||||
run_test(tjbenchtest "-java;-precision;${PRECISION}")
|
||||
@@ -71,7 +68,4 @@ if(WITH_JAVA)
|
||||
run_test(tjbenchtest "-java;-precision;${PRECISION};-arithmetic;-yuv")
|
||||
endif()
|
||||
run_test(tjbenchtest "-java;-precision;${PRECISION};-lossless")
|
||||
if(PRECISION EQUAL 8)
|
||||
run_test(tjexampletest "-java")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
26
cmakescripts/tjexampletest.cmake
Normal file
26
cmakescripts/tjexampletest.cmake
Normal file
@@ -0,0 +1,26 @@
|
||||
if(NOT DEFINED WITH_JAVA)
|
||||
message(FATAL_ERROR "WITH_JAVA must be specified")
|
||||
endif()
|
||||
|
||||
macro(check_error program)
|
||||
if(NOT RESULT EQUAL 0)
|
||||
message(FATAL_ERROR "${program} failed.")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(run_test PROG ARGS)
|
||||
string(REPLACE ";" " " SPACED_ARGS "${ARGS}")
|
||||
message(STATUS "${PROG} ${SPACED_ARGS}")
|
||||
execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test/${PROG} ${ARGS}
|
||||
RESULT_VARIABLE RESULT)
|
||||
check_error("${PROG} ${SPACED_ARGS}")
|
||||
endmacro()
|
||||
|
||||
run_test(tjcomptest "")
|
||||
run_test(tjdecomptest "")
|
||||
run_test(tjtrantest "")
|
||||
if(WITH_JAVA)
|
||||
run_test(tjcomptest "-java")
|
||||
run_test(tjdecomptest "-java")
|
||||
run_test(tjtrantest "-java")
|
||||
endif()
|
||||
Reference in New Issue
Block a user