commit 4dd77996a10c8c6ccc3d6052e58fd45e39797f27
Author: Kornel Benko <[email protected]>
Date:   Sat Dec 5 19:25:23 2015 +0100

    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.

diff --git a/development/autotests/ExportTests.cmake 
b/development/autotests/ExportTests.cmake
index 0067128..4d3b316 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 73f78d3..eb94b94 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)

Reply via email to