Dear Kornel and Scott,

On 2016-03-20, Kornel Benko wrote:
> Am 20. März 2016 um 17:43:47, schrieb Guenter Milde <mi...@users.sf.net>

...

>> The following simple patch allows to specify all three cases:

>> a) "words" joined by '_' -> one label (or sublabel)

>> b) "words" joined by ':' -> label + subordinate label

>> c) "words" separated with any <separator> -> independent labels (same depth)

...

> You forgot the lines 209 and 240 in ExportTests.cmake, but yes.

Added. Do you think the patches below could go in?

...

Open issue:

>> #> ctest -N -L version -R pdf$
>> Test project /usr/local/src/lyxtest
>>   Test #1941: 
>> UNRELIABLE.TEXISSUES:INCOMPATIBLE_VERSIONS_export/examples/aas_sample_pdf
>>   Test #4500: 
>> UNRELIABLE.TEXISSUES:INCOMPATIBLE_VERSIONS_export/templates/aastex_pdf

>> Here, the colon differs from the '.' used as "joiner" in name formation.
>> However, for simpler pattern matchig with "-R", the colon would be a better
>> choice anyway...


> Looks good. Scott, when will 2.2 be out?

Scott, are changes to the test scripts that do not change the result (but
the names and labels) OK also before (if Kornel gives a +1)? 

Or should we rather wait...

Günter


>From 6e980ae54ba813e45a821670a3f53d61f797450d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnter=20Milde?= <mi...@lyx.org>
Date: Tue, 22 Mar 2016 15:52:10 +0100
Subject: [PATCH] cmake autotests: do not include "location labels" in test
 names.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

On 2016-03-20, Kornel Benko wrote in gmane.editors.lyx.devel:
> Am Samstag, 19. März 2016 um 23:12:32, schrieb Guenter Milde 
> <mi...@users.sf.net>

>> I [...] suggest that labels for "mathmacros", "examples",
>> "templates", "manuals" are not required and without them the test system
>> would become easier to understand and use.

> Like the attached?
---
 development/autotests/ExportTests.cmake   | 10 ++++++++--
 development/cmake/modules/LyXMacros.cmake |  2 +-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/development/autotests/ExportTests.cmake 
b/development/autotests/ExportTests.cmake
index 2b84dd7..f1a178e 100644
--- a/development/autotests/ExportTests.cmake
+++ b/development/autotests/ExportTests.cmake
@@ -108,7 +108,13 @@ endmacro()
 
 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()
@@ -265,7 +271,7 @@ endmacro()
 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)
diff --git a/development/cmake/modules/LyXMacros.cmake 
b/development/cmake/modules/LyXMacros.cmake
index a3db752..2e2f7d8 100644
--- a/development/cmake/modules/LyXMacros.cmake
+++ b/development/cmake/modules/LyXMacros.cmake
@@ -329,7 +329,7 @@ macro(sortlabellist listout)
     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)
-- 
2.7.0





>From 5d97974e166539a5fdedd0af7cf4f724f9dcdd6c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnter=20Milde?= <mi...@lyx.org>
Date: Tue, 22 Mar 2016 16:03:26 +0100
Subject: [PATCH] ctest autotests: allow characters : and _ in labels.

Allows to specify

  sublabels_comprising_of_several_words
  sublabels_with:subsublabels

in the test sorting/categorization files (development/autotests/*Tests).
---
 development/autotests/ExportTests.cmake | 6 +++---
 development/autotests/unreliableTests   | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/development/autotests/ExportTests.cmake 
b/development/autotests/ExportTests.cmake
index f1a178e..8ad7a58 100644
--- a/development/autotests/ExportTests.cmake
+++ b/development/autotests/ExportTests.cmake
@@ -80,7 +80,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 "")
@@ -206,7 +206,7 @@ macro(loadTestList filename resList depth)
       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]*[a-zA-Z_:]+)" _labels ${_newlabels})
         foreach(labname ${_labels})
           if (NOT labname STREQUAL "RESET")
             list(APPEND mylabels ${labname})
@@ -237,7 +237,7 @@ macro(loadTestList filename resList depth)
     endif()
   endforeach()
   foreach(_l1 ${mylabels})
-    if (_l1 MATCHES "^([0-9]+)([a-zA-Z]+)$")
+    if (_l1 MATCHES "^([0-9]+)([a-zA-Z_:]+)$")
       set(_l ${CMAKE_MATCH_2})
       set(depth1 ${CMAKE_MATCH_1})
     else()
diff --git a/development/autotests/unreliableTests 
b/development/autotests/unreliableTests
index dc361ce..e4c7064 100644
--- a/development/autotests/unreliableTests
+++ b/development/autotests/unreliableTests
@@ -56,8 +56,8 @@ export/examples/(|fr/)seminar_.*
 export/doc/es/Customization_pdf4_texF
 
 
-Sublabel: varying_versions
-# ========================
+Sublabel: texissues:incompatible_versions
+# =======================================
 # Test depending on TeX distribution, package versions or OS
 
 # document class aastex.cls replaced by aastex6.cls
-- 
2.7.0






Reply via email to