commit 7e5b1d09f3dc27ff41c5b112e7e61da785765bb8
Author: Kornel Benko <kor...@lyx.org>
Date:   Fri Nov 27 00:49:03 2020 +0100

    Cmake tests: Save the number of ignored tests in file for later review
---
 CMakeLists.txt                          |    6 ++++++
 development/autotests/CMakeLists.txt    |    3 +++
 development/autotests/ExportTests.cmake |    9 +++++----
 3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index fedcbb1..808a0cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1279,4 +1279,10 @@ endif()
 # can be run last
 add_subdirectory(development/cmake/post_install)
 
+string(TIMESTAMP current_date "%Y-%m-%d %H:%M")
+execute_process(COMMAND ${LYX_GITVERSION} describe --tags
+       WORKING_DIRECTORY "${TOP_SRC_DIR}"
+       OUTPUT_VARIABLE current_version
+       OUTPUT_STRIP_TRAILING_WHITESPACE)
+file(APPEND "${TOP_BINARY_DIR}/Testing/IgnoredCount" "${current_date} 
${current_version} Ignored tests = ${LYX_ignored_count}\n")
 message(STATUS)
diff --git a/development/autotests/CMakeLists.txt 
b/development/autotests/CMakeLists.txt
index 208e74b..4719229 100644
--- a/development/autotests/CMakeLists.txt
+++ b/development/autotests/CMakeLists.txt
@@ -122,5 +122,8 @@ if(QT_USES_X11)
 endif()
 
 if (LYX_ENABLE_EXPORT_TESTS)
+  set(lyx_ignored_count 0)
   include(${TOP_SRC_DIR}/development/autotests/ExportTests.cmake)
+  message(STATUS "Number of ignored export tests now ${lyx_ignored_count}")
+  set(LYX_ignored_count ${lyx_ignored_count} PARENT_SCOPE)
 endif()
diff --git a/development/autotests/ExportTests.cmake 
b/development/autotests/ExportTests.cmake
index e8ab4f5..18b98fd 100644
--- a/development/autotests/ExportTests.cmake
+++ b/development/autotests/ExportTests.cmake
@@ -159,7 +159,11 @@ macro(maketestname testname inverted listinverted 
listignored listunreliable lis
   endif()
   set(sublabel "${${listlabels}}")
   findexpr(mfound ${testname} ${listignoredx} sublabel)
-  if (NOT mfound)
+  if (mfound)
+    MATH(EXPR lyx_ignored_count "${lyx_ignored_count}+1")
+    # No testname because ignored
+    set(${testname} "")
+  else()
     set(sublabel2 "")
     findexpr(foundunreliable ${testname} ${listunreliablex} sublabel2)
     if (foundunreliable)
@@ -194,9 +198,6 @@ macro(maketestname testname inverted listinverted 
listignored listunreliable lis
       set(${testname} "${tmpprefix}${${testname}}")
       set(${listlabels} ${sublabel})
     endif()
-  else()
-    # No testname because ignored
-    set(${testname} "")
   endif()
 endmacro()
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to