Am Montag, 9. Januar 2017 um 17:07:01, schrieb Kornel Benko <kor...@lyx.org> > Am Montag, 9. Januar 2017 um 10:55:06, schrieb Scott Kostyshak > <skost...@lyx.org> > > On Mon, Jan 09, 2017 at 04:50:55PM +0100, Kornel Benko wrote: > > > > > I'd prefer to make the behaviour be document specific. Ignoring errors in > > > tests > > > does not feel right if used in general. > > > > Sounds good to me. Seems like you and Jürgen agree on this. Kornel, > > would it be difficult to incorporate this into our ctest framework in a > > document-specific way? Would we just use a special label? Do you mind > > doing the work? > > I will look into this. >
Something like attached should work. Contents of the new file "ignoreMissingGlyphTests" is "export/doc/UserGuide_(dvi3|pdf4|pdf5)_systemF" Kornel
diff --git a/development/autotests/ExportTests.cmake b/development/autotests/ExportTests.cmake index 7184994..837eec5 100644 --- a/development/autotests/ExportTests.cmake +++ b/development/autotests/ExportTests.cmake @@ -186,7 +186,7 @@ macro(maketestname testname inverted listinverted listignored listunreliable lis endif() endmacro() -macro(loadTestList filename resList depth) +macro(loadTestList filename resList depth splitlangs) # Create list of strings from a file without comments # ENCODING parameter is a new feature in cmake 3.1 initLangVars(${resList}) @@ -218,8 +218,12 @@ macro(loadTestList filename resList depth) list(REMOVE_DUPLICATES mylabels) set(sublabel ${_newl}) else() - string(REGEX REPLACE "(\\/|\\||\\(|\\))" " " _vxx ${_newl}) - string(REGEX MATCHALL " ([a-z][a-z](_[A-Z][A-Z])?) " _vx ${_vxx}) + if (splitlangs) + string(REGEX REPLACE "(\\/|\\||\\(|\\))" " " _vxx ${_newl}) + string(REGEX MATCHALL " ([a-z][a-z](_[A-Z][A-Z])?) " _vx ${_vxx}) + else() + set(_vx OFF) + endif() if(_vx) foreach(_v ${_vx}) string(REGEX REPLACE " " "" _v ${_v}) @@ -276,10 +280,11 @@ assignLabelDepth(1 "unreliable" "inverted") assignLabelDepth(2 "suspended") assignLabelDepth(-1 "examples" "manuals" "mathmacros" "templates" "autotests") -loadTestList(invertedTests invertedTests 7) -loadTestList(ignoredTests ignoredTests 0) -loadTestList(suspendedTests suspendedTests 6) -loadTestList(unreliableTests unreliableTests 5) +loadTestList(invertedTests invertedTests 7 ON) +loadTestList(ignoredTests ignoredTests 0 ON) +loadTestList(suspendedTests suspendedTests 6 ON) +loadTestList(unreliableTests unreliableTests 5 ON) +loadTestList(ignoreMissingGlyphTests ignoreMissingGlyphTests 8 OFF) foreach(libsubfolderx autotests/export lib/doc lib/examples lib/templates autotests/mathmacros) set(testlabel "export") @@ -417,6 +422,13 @@ foreach(libsubfolderx autotests/export lib/doc lib/examples lib/templates autote set(mytestlabel ${testlabel}) maketestname(TestName inverted invertedTests ignoredTests unreliableTests mytestlabel) if(TestName) + set(missingLabels ) # will be ignored + findexpr(mfound TestName ignoreMissingGlyphTests missingLabels) + if (mfound) + set(_ignoreMissingGlyphsError ON) + else() + set(_ignoreMissingGlyphsError OFF) + endif() add_test(NAME ${TestName} WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}" COMMAND ${CMAKE_COMMAND} -DLYX_ROOT=${LIBSUB_SRC_DIR} @@ -429,6 +441,7 @@ foreach(libsubfolderx autotests/export lib/doc lib/examples lib/templates autote -Dfile=${f} -Dinverted=${inverted} -DTOP_SRC_DIR=${TOP_SRC_DIR} + -DIgnoreMissingGlyphsError=${_ignoreMissingGlyphsError} -DPERL_EXECUTABLE=${PERL_EXECUTABLE} -DXMLLINT_EXECUTABLE=${XMLLINT_EXECUTABLE} -DENCODING=${_enc2} diff --git a/development/autotests/check_load.cmake b/development/autotests/check_load.cmake index 0a0d351..860f1ff 100644 --- a/development/autotests/check_load.cmake +++ b/development/autotests/check_load.cmake @@ -28,7 +28,7 @@ execute_process( ERROR_VARIABLE lyxerr) message(STATUS "Error code of lyx = ${_err}") - +message(STATUS "lyxerr=${lyxerr}") # # Ignore messages between "reconfiguring user directory" and "LyX: Done!" # (Reconfigure-messages are not symptom of an error) diff --git a/development/autotests/export.cmake b/development/autotests/export.cmake index 08fd86e..74cf9d6 100755 --- a/development/autotests/export.cmake +++ b/development/autotests/export.cmake @@ -24,6 +24,7 @@ # -Dfile=xxx \ # -Dinverted=[01] \ # -DTOP_SRC_DIR=${TOP_SRC_DIR} \ +# -DIgnoreMissingGlyphsError=(ON/OFF) \ # -DPERL_EXECUTABLE=${PERL_EXECUTABLE} \ # -DXMLLINT_EXECUTABLE=${XMLLINT_EXECUTABLE} \ # -DENCODING=xxx \ @@ -143,6 +144,9 @@ else() else() set(LatexDebugParam) endif() + if(IgnoreMissingGlyphsError) + list(APPEND LatexDebugParam --ignore-error-message missing_glyphs) + endif() message(STATUS "Executing ${lyx} ${LatexDebugParam} -userdir \"${LYX_TESTS_USERDIR}\" -E ${format} ${result_file_name} \"${LYX_SOURCE}\"") file(REMOVE ${result_file_name}) execute_process( @@ -191,7 +195,7 @@ if(inverted) else() string(COMPARE NOTEQUAL ${_err} 0 _erg) endif() -execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${TempDir}") +#execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${TempDir}") if(_erg) message(STATUS "Exporting ${file}.lyx to ${format}") message(FATAL_ERROR "Export failed")
signature.asc
Description: This is a digitally signed message part.