Cmake tests: Save the number of ignored tests in file for later review

This commit is contained in:
Kornel Benko 2020-11-27 00:49:03 +01:00
parent 46d90b3415
commit 7e5b1d09f3
3 changed files with 14 additions and 4 deletions

View File

@ -1279,4 +1279,10 @@ endif()
# can be run last # can be run last
add_subdirectory(development/cmake/post_install) 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) message(STATUS)

View File

@ -122,5 +122,8 @@ if(QT_USES_X11)
endif() endif()
if (LYX_ENABLE_EXPORT_TESTS) if (LYX_ENABLE_EXPORT_TESTS)
set(lyx_ignored_count 0)
include(${TOP_SRC_DIR}/development/autotests/ExportTests.cmake) 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() endif()

View File

@ -159,7 +159,11 @@ macro(maketestname testname inverted listinverted listignored listunreliable lis
endif() endif()
set(sublabel "${${listlabels}}") set(sublabel "${${listlabels}}")
findexpr(mfound ${testname} ${listignoredx} sublabel) 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 "") set(sublabel2 "")
findexpr(foundunreliable ${testname} ${listunreliablex} sublabel2) findexpr(foundunreliable ${testname} ${listunreliablex} sublabel2)
if (foundunreliable) if (foundunreliable)
@ -194,9 +198,6 @@ macro(maketestname testname inverted listinverted listignored listunreliable lis
set(${testname} "${tmpprefix}${${testname}}") set(${testname} "${tmpprefix}${${testname}}")
set(${listlabels} ${sublabel}) set(${listlabels} ${sublabel})
endif() endif()
else()
# No testname because ignored
set(${testname} "")
endif() endif()
endmacro() endmacro()