From 4dd77996a10c8c6ccc3d6052e58fd45e39797f27 Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Sat, 5 Dec 2015 19:25:23 +0100 Subject: [PATCH] Cmake export tests: Allow deeper label nesting. Previously all labels got the depth '7' while processing 'suspiciousTestss'. The depth is used to sort how our labels are used to build a test-label. Say a test gets label a, b, and c, with depth 3, 8 and 2. The constructed test-label will be "b:a:c" For new (to be implemented) 'reason-labels' it is more convenient to assign them higher values. --- development/autotests/ExportTests.cmake | 15 +++++++++++---- development/autotests/suspiciousTests | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/development/autotests/ExportTests.cmake b/development/autotests/ExportTests.cmake index 0067128cc2..4d3b316bf8 100644 --- a/development/autotests/ExportTests.cmake +++ b/development/autotests/ExportTests.cmake @@ -70,7 +70,7 @@ macro(findexpr found testname listname rsublabel) if ("${_itrx}" MATCHES "^Sublabel:") set(tmpsublabel "") string(REGEX REPLACE "^Sublabel:[ \t]*" "" _itrlabels ${_itrx}) - string(REGEX MATCHALL "([a-zA-Z]+)" _labels ${_itrlabels}) + string(REGEX MATCHALL "[a-zA-Z]+" _labels ${_itrlabels}) foreach(subl ${_labels}) if (subl STREQUAL "RESET") set(tmpsublabel "") @@ -182,7 +182,7 @@ macro(loadTestList filename resList depth) list(APPEND ${resList} "${_newl}") if (_newl MATCHES "^Sublabel:") string(REGEX REPLACE "^Sublabel:[ \t]*" "" _newlabels ${_newl}) - string(REGEX MATCHALL "([a-zA-Z]+)" _labels ${_newlabels}) + string(REGEX MATCHALL "([0-9]*[a-zA-Z]+)" _labels ${_newlabels}) foreach(labname ${_labels}) if (NOT labname STREQUAL "RESET") list(APPEND mylabels ${labname}) @@ -212,12 +212,19 @@ macro(loadTestList filename resList depth) endif() endif() endforeach() - foreach(_l ${mylabels}) + foreach(_l1 ${mylabels}) + if (_l1 MATCHES "^([0-9]+)([a-zA-Z]+)$") + set(_l ${CMAKE_MATCH_2}) + set(depth1 ${CMAKE_MATCH_1}) + else() + set(_l ${_l1}) + set(depth1 "0") + endif() list(FIND known_labels ${_l} _ff) if (_ff GREATER -1) message(STATUS "Label \"${_l}\" already in use. Reused in ${filename}") else() - assignLabelDepth(${depth} ${_l}) + assignLabelDepth(${depth}${depth1} ${_l}) endif() endforeach() foreach(_lg ${languages}) diff --git a/development/autotests/suspiciousTests b/development/autotests/suspiciousTests index 73f78d380a..eb94b942dc 100644 --- a/development/autotests/suspiciousTests +++ b/development/autotests/suspiciousTests @@ -186,7 +186,7 @@ export/doc/(ru|uk)/splash_(dvi3|pdf[45])_texF # # GM: chemgreek incompatible with LuaTeX (cf. Math.lyx) # for now inverted -Sublabel: chemgreek +Sublabel: 3chemgreek export/doc/sk/Intro_pdf5_systemF export/examples/(|de/|fr/)PDF-comment_pdf5_texF export/examples/aas_sample_(dvi3|pdf5)_(texF|systemF) -- 2.39.2