In collaboration with Günter Milde:
1.) Allow char ':' be part of a ctest-label
2.) Eliminate redundant label naming and directory names
(The testnames should not repeat the directory name)
set(potential_languages "ca" "cs" "da" "de" "el" "es" "eu" "fa" "fr" "gl" "he" "hu" "id" "it" "ja" "ko" "nb" "nl" "pl" "pt" "ro" "ru" "sk" "sl" "sr" "sv" "uk" "zh_CN")
set(potential_languages "ca" "cs" "da" "de" "el" "es" "eu" "fa" "fr" "gl" "he" "hu" "id" "it" "ja" "ko" "nb" "nl" "pl" "pt" "ro" "ru" "sk" "sl" "sr" "sv" "uk" "zh_CN")
+# Used to select labels from .*Tests files
+set(label_chars "[a-zA-Z:]+")
+
macro(initLangVars varname)
foreach(_l ${potential_languages})
set(${varname}_${_l})
macro(initLangVars varname)
foreach(_l ${potential_languages})
set(${varname}_${_l})
if ("${_itrx}" MATCHES "^Sublabel:")
set(tmpsublabel "")
string(REGEX REPLACE "^Sublabel:[ \t]*" "" _itrlabels ${_itrx})
if ("${_itrx}" MATCHES "^Sublabel:")
set(tmpsublabel "")
string(REGEX REPLACE "^Sublabel:[ \t]*" "" _itrlabels ${_itrx})
- string(REGEX MATCHALL "[a-zA-Z]+" _labels ${_itrlabels})
+ string(REGEX MATCHALL ${label_chars} _labels ${_itrlabels})
foreach(subl ${_labels})
if (subl STREQUAL "RESET")
set(tmpsublabel "")
foreach(subl ${_labels})
if (subl STREQUAL "RESET")
set(tmpsublabel "")
function(join rvalues glue routput)
set(locallist ${${rvalues}})
function(join rvalues glue routput)
set(locallist ${${rvalues}})
- list(REMOVE_ITEM locallist "export" "lyx2lyx" "load")
+ set(removelist "export" "lyx2lyx" "load")
+ foreach(_l ${locallist})
+ if (depth_${_l} LESS 0)
+ list(APPEND removelist ${_l})
+ endif()
+ endforeach()
+ list(REMOVE_ITEM locallist ${removelist})
string(REGEX REPLACE "([^\\]|^);" "\\1${glue}" out "${locallist}")
set(${routput} ${out} PARENT_SCOPE)
endfunction()
string(REGEX REPLACE "([^\\]|^);" "\\1${glue}" out "${locallist}")
set(${routput} ${out} PARENT_SCOPE)
endfunction()
list(APPEND ${resList} "${_newl}")
if (_newl MATCHES "^Sublabel:")
string(REGEX REPLACE "^Sublabel:[ \t]*" "" _newlabels ${_newl})
list(APPEND ${resList} "${_newl}")
if (_newl MATCHES "^Sublabel:")
string(REGEX REPLACE "^Sublabel:[ \t]*" "" _newlabels ${_newl})
- string(REGEX MATCHALL "([0-9]*[a-zA-Z]+)" _labels ${_newlabels})
+ string(REGEX MATCHALL "([0-9]*${label_chars})" _labels ${_newlabels})
foreach(labname ${_labels})
if (NOT labname STREQUAL "RESET")
list(APPEND mylabels ${labname})
foreach(labname ${_labels})
if (NOT labname STREQUAL "RESET")
list(APPEND mylabels ${labname})
endif()
endforeach()
foreach(_l1 ${mylabels})
endif()
endforeach()
foreach(_l1 ${mylabels})
- if (_l1 MATCHES "^([0-9]+)([a-zA-Z]+)$")
+ if (_l1 MATCHES "^([0-9]+)(${label_chars})$")
set(_l ${CMAKE_MATCH_2})
set(depth1 ${CMAKE_MATCH_1})
else()
set(_l ${CMAKE_MATCH_2})
set(depth1 ${CMAKE_MATCH_1})
else()
assignLabelDepth(0 "export" "key" "layout" "load" "lyx2lyx" "module" "roundtrip" "url")
assignLabelDepth(1 "unreliable" "inverted")
assignLabelDepth(2 "suspended")
assignLabelDepth(0 "export" "key" "layout" "load" "lyx2lyx" "module" "roundtrip" "url")
assignLabelDepth(1 "unreliable" "inverted")
assignLabelDepth(2 "suspended")
-assignLabelDepth(3 "examples" "manuals" "mathmacros" "templates" "autotests")
+assignLabelDepth(-1 "examples" "manuals" "mathmacros" "templates" "autotests")
loadTestList(suspiciousTests suspiciousTests 7)
loadTestList(ignoredTests ignoredTests 0)
loadTestList(suspiciousTests suspiciousTests 7)
loadTestList(ignoredTests ignoredTests 0)
list(APPEND tmplist "${depth_${_lab}}${_lab}")
endforeach()
list(SORT tmplist)
list(APPEND tmplist "${depth_${_lab}}${_lab}")
endforeach()
list(SORT tmplist)
- string(REGEX REPLACE ";[0-9]+" ";" ${listout} ";${tmplist}")
+ string(REGEX REPLACE ";[-0-9]+" ";" ${listout} ";${tmplist}")
endmacro()
macro(createlabel reslabel first)
endmacro()
macro(createlabel reslabel first)