endmacro()
function(join rvalues glue routput)
- string(REGEX REPLACE "([^\\]|^);" "\\1${glue}" out "${${rvalues}}")
+ set(locallist ${${rvalues}})
+ list(REMOVE_ITEM locallist "export" "lyx2lyx" "load")
+ string(REGEX REPLACE "([^\\]|^);" "\\1${glue}" out "${locallist}")
set(${routput} ${out} PARENT_SCOPE)
endfunction()
macro(maketestname testname reverted listsuspicious listignored listunreliable listlabels)
- set(sublabel "")
string(REGEX MATCH "\\/[a-z][a-z](_[A-Z][A-Z])?\\/" _v ${${testname}})
if(_v)
string(REGEX REPLACE "\\/" "" _v ${_v})
set(listsuspiciousx ${listsuspicious}_${_v})
set(listignoredx ${listignored}_${_v})
set(listunreliablex ${listunreliable}_${_v})
+ set(listsuspendedx suspendedTests_${v})
else()
set(listsuspiciousx ${listsuspicious})
set(listignoredx ${listignored})
set(listunreliablex ${listunreliable})
+ set(listsuspendedx suspendedTests)
endif()
- set(sublabel "")
+ set(sublabel "${${listlabels}}")
findexpr(mfound ${testname} ${listignoredx} sublabel)
if (NOT mfound)
- string(REGEX MATCH "_(systemF|texF|pdf3|pdf2|pdf|dvi|lyx16|xhtml)$" _v ${${testname}})
- # check if test _may_ be in listsuspicious
- if (_v)
- findexpr(mfound ${testname} ${listsuspiciousx} sublabel)
+ set(sublabel2 "")
+ findexpr(foundunreliable ${testname} ${listunreliablex} sublabel2)
+ if (foundunreliable)
+ set(sublabel "unreliable" ${sublabel} ${sublabel2})
+ list(REMOVE_ITEM sublabel "export" "reverted" "templates" "mathmacros" "manuals" "autotests")
else()
- set(mfound OFF)
- endif()
- if (NOT mfound)
- set(${reverted} 0)
- else()
- # Now that the test is suspect,
- # check if it is unreliable, and/or suspended
+ string(REGEX MATCH "_(systemF|texF|pdf3|pdf2|pdf|dvi|lyx16|xhtml)$" _v ${${testname}})
+ # check if test _may_ be in listsuspicious
set(sublabel2 "")
- findexpr(nsfound ${testname} ${listunreliablex} sublabel2)
- findexpr(nsfound2 ${testname} suspendedTests sublabel2)
- list(APPEND sublabel ${sublabel2})
- if (nsfound)
- set(sublabel "unreliable" ${sublabel})
- endif()
- if (nsfound2)
- set(sublabel "suspended" ${sublabel})
+ if (_v)
+ findexpr(mfound ${testname} ${listsuspiciousx} sublabel2)
+ else()
+ set(mfound OFF)
endif()
- list(REMOVE_DUPLICATES sublabel)
- if (nsfound OR nsfound2)
- list(APPEND ${listlabels} ${sublabel})
- set(${reverted} 0)
+ if (mfound)
+ set(sublabel3 "")
+ findexpr(foundsuspended ${testname} ${listsuspendedx} sublabel3)
+ set(${reverted} 1)
+ if (foundsuspended)
+ set(sublabel "reverted" "suspended" ${sublabel} ${sublabel2} ${sublabel3})
+ list(REMOVE_ITEM sublabel "export")
+ else()
+ set(sublabel "reverted" ${sublabel} ${sublabel2} ${sublabel3})
+ endif()
else()
- set(sublabel "reverted" ${sublabel})
- set(${reverted} 1)
+ set(${reverted} 0)
endif()
+ endif()
+ list(REMOVE_DUPLICATES sublabel)
+ if (NOT sublabel STREQUAL "")
join(sublabel "." tmpprefixx)
string(TOUPPER "${tmpprefixx}_" tmpprefix)
set(${testname} "${tmpprefix}${${testname}}")
string(TOUPPER "${sublabel}_" tmpprefix)
- if (NOT sublabel STREQUAL "")
- list(APPEND ${listlabels} ${sublabel})
- list(FIND ${listlabels} "chemgreek" _i)
- endif()
+ set(${listlabels} ${sublabel})
endif()
else()
set(${testname} "")
loadTestList(suspendedTests suspendedTests)
loadTestList(unreliableTests unreliableTests)
-macro(handlesuspended TestName reverted testlabel)
- set(mylabel ${${testlabel}})
- set(myreverted ${reverted})
- set(sublabel)
-
- # check for unreliable
- if ("${TestName}" MATCHES "^UNRELIABLE")
- list(REMOVE_ITEM mylabel "export" "reverted" "templates" "mathmacros" "manuals")
- list(APPEND mylabel "unreliable")
- set(myreverted 0)
- elseif (${reverted})
- # check suspension only for reverted tests
- findexpr(tfound TestName suspendedTests sublabel)
- if (tfound)
- set(mylabel "suspended")
- if (sublabel)
- list(APPEND mylabel ${sublabel})
- endif()
- set(myreverted 0) # if test is to be suspended, remove the 'reverted' flag
- endif()
- endif()
- setmarkedtestlabel(${TestName} ${myreverted} ${mylabel})
-endmacro()
-
# preparing to add e.g. development/mathmacros to the foreach() loop
foreach(libsubfolderx autotests/export lib/doc lib/examples lib/templates development/mathmacros)
set(testlabel "export")
-DTOP_SRC_DIR=${TOP_SRC_DIR}
-DPERL_EXECUTABLE=${PERL_EXECUTABLE}
-P "${TOP_SRC_DIR}/development/autotests/export.cmake")
- handlesuspended(${TestName} ${reverted} mytestlabel) # checking for suspended lyx16 exports
+ setmarkedtestlabel(${TestName} ${reverted} ${mytestlabel})
endif()
if(LYX_PYTHON_EXECUTABLE)
set(lyx2lyxtestlabel "lyx2lyx")
"-DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR}"
"-DLYXFILE=${LIBSUB_SRC_DIR}/${f}.lyx"
-P "${TOP_SRC_DIR}/development/autotests/lyx2lyxtest.cmake")
- handlesuspended(${TestName} ${reverted} mytestlabel)
+ setmarkedtestlabel(${TestName} ${reverted} ${mytestlabel})
endif()
endif()
set(loadtestlabel "load")
-DPARAMS_DIR=${TOP_SRC_DIR}/development/autotests
-DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}
-P "${TOP_SRC_DIR}/development/autotests/check_load.cmake")
- handlesuspended(${TestName} ${reverted} mytestlabel)
+ setmarkedtestlabel(${TestName} ${reverted} ${mytestlabel})
set_tests_properties(${TestName} PROPERTIES RUN_SERIAL ON)
endif()
getoutputformats("${LIBSUB_SRC_DIR}/${f}.lyx" formatlist)
-DTOP_SRC_DIR=${TOP_SRC_DIR}
-DPERL_EXECUTABLE=${PERL_EXECUTABLE}
-P "${TOP_SRC_DIR}/development/autotests/export.cmake")
- handlesuspended(${TestName} ${reverted} mytestlabel) # check for suspended pdf/dvi exports
+ setmarkedtestlabel(${TestName} ${reverted} ${mytestlabel}) # check for suspended pdf/dvi exports
endif()
endforeach()
endforeach()