]> git.lyx.org Git - lyx.git/commitdiff
Cmake tests: Save the number of ignored tests in file for later review
authorKornel Benko <kornel@lyx.org>
Thu, 26 Nov 2020 23:49:03 +0000 (00:49 +0100)
committerKornel Benko <kornel@lyx.org>
Thu, 26 Nov 2020 23:51:36 +0000 (00:51 +0100)
CMakeLists.txt
development/autotests/CMakeLists.txt
development/autotests/ExportTests.cmake

index fedcbb1be15544724e2219e3a03c199ed0290cd7..808a0ccb6e6bd45779c42ead5442a952919c69cf 100644 (file)
@@ -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)
index 208e74be1a257f77c4a91b3d88a9bd5e131dfd24..471922972f0087d9e812bc8d4d32b56d5ab29256 100644 (file)
@@ -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()
index e8ab4f5af865466c1230804a6818372ae53d9c57..18b98fd6c57a6eefbccc7f7e8df0b15a78e7ee40 100644 (file)
@@ -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()