Cmake check load tests: Allow tests to use the filter .*Tests

Now we can also select which lyx-file may or may not be loaded
in the same way as was for export tests.
This commit is contained in:
Kornel Benko 2015-12-27 18:56:36 +01:00
parent 77f5baec8f
commit ddfd228dc3
3 changed files with 13 additions and 4 deletions

View File

@ -136,7 +136,7 @@ macro(maketestname testname inverted listsuspicious listignored listunreliable l
set(sublabel "unreliable" ${sublabel} ${sublabel2})
list(REMOVE_ITEM sublabel "export" "inverted" "templates" "mathmacros" "manuals" "autotests")
else()
string(REGEX MATCH "_(systemF|texF|pdf3|pdf2|pdf|dvi|lyx[0-9][0-9]|xhtml)$" _v ${${testname}})
string(REGEX MATCH "(^check_load|_(systemF|texF|pdf3|pdf2|pdf|dvi|lyx[0-9][0-9]|xhtml)$)" _v ${${testname}})
# check if test _may_ be in listsuspicious
set(sublabel2 "")
if (_v)
@ -355,9 +355,10 @@ foreach(libsubfolderx autotests/export lib/doc lib/examples lib/templates autote
-Dlyx=$<TARGET_FILE:${_lyx}>
-DPARAMS_DIR=${TOP_SRC_DIR}/development/autotests
-DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}
-Dinverted=${inverted}
-P "${TOP_SRC_DIR}/development/autotests/check_load.cmake")
setmarkedtestlabel(${TestName} ${mytestlabel})
set_tests_properties(${TestName} PROPERTIES RUN_SERIAL ON)
#set_tests_properties(${TestName} PROPERTIES RUN_SERIAL ON)
endif()
getoutputformats("${LIBSUB_SRC_DIR}/${f}.lyx" formatlist)
foreach(format ${formatlist})

View File

@ -14,6 +14,7 @@
# -DLYXFILE=xxx \
# -DLYX_USERDIR_VER=${LYX_USERDIR_VER} \
# -DPARAMS_DIR="${TOP_SRC_DIR}/development/autotests" \
# -Dinverted=${inverted}
# -P "${TOP_SRC_DIR}/development/autotests/check_load.cmake"
#
@ -27,14 +28,20 @@ execute_process(
ERROR_VARIABLE lyxerr)
message(STATUS "Error code of lyx = ${_err}")
string(COMPARE NOTEQUAL ${_err} 0 _erg)
#
# Ignore messages between "reconfiguring user directory" and "LyX: Done!"
# (Reconfigure-messages are not symptom of an error)
include(${PARAMS_DIR}/CheckLoadErrors.cmake)
CheckLoadErrors(lyxerr "${PARAMS_DIR}" _erg)
if (NOT _err)
CheckLoadErrors(lyxerr "${PARAMS_DIR}" _err)
endif()
if(inverted)
string(COMPARE EQUAL ${_err} 0 _erg)
else()
string(COMPARE NOTEQUAL ${_err} 0 _erg)
endif()
if(_erg)
# We print here the whole error output, even the ignored part
message(FATAL_ERROR "lyx gave warnings/errors:\n${lyxerr}")

View File

@ -154,6 +154,7 @@ export/examples/aas_sample_(dvi3|pdf5)_(texF|systemF)
# Following mathmacros tests fail
export/mathmacros/testcases_speed_(dvi|pdf|pdf[23]|(dvi3|pdf[45])_(texF|systemF))
check_load/mathmacros/testcases_speed
# Language nesting, document is OK, fails because of a bug in LyX
# document is still worng, did only fail because of latin language