Cmake tests: Allow regular expressions to select for reverted tests.

This commit is contained in:
Kornel Benko 2014-04-21 19:18:42 +02:00
parent f3a96fb833
commit dae08c371f

View File

@ -136,19 +136,24 @@ macro(getoutputformats filepath varname)
set(${varname} ${out_formats})
endmacro()
macro(maketestname testname reverted listreverted listignored)
set(_idx -1)
foreach(_itrx ${${listignored}})
macro(findexpr found testname listname)
set(_found 0)
foreach(_itrx ${${listname}})
set(_itr "^${_itrx}$")
if(${testname} MATCHES ${_itr})
set(_idx 0)
set(_found 1)
break()
endif()
endforeach()
#list(FIND ${listignored} ${${testname}} _idx)
if (${_idx} LESS 0)
set(${found} ${_found})
endmacro()
macro(maketestname testname reverted listreverted listignored)
findexpr(mfound ${testname} ${listignored})
if (NOT mfound)
findexpr(mfound ${testname} ${listreverted})
list(FIND ${listreverted} ${${testname}} _idx)
if (${_idx} LESS 0)
if (NOT mfound)
set(${reverted} 0)
else()
set(${reverted} 1)