Cmake export tests: Renamed file revertedTests to suspendedTests

Also some refactoring to handle the labes.
This commit is contained in:
Kornel Benko 2015-11-28 18:23:29 +01:00
parent fe5f88ddf9
commit 56ecd464f3
3 changed files with 276 additions and 46 deletions

View File

@ -65,21 +65,21 @@ endmacro()
macro(findexpr found testname listname rsublabel)
set(_found 0)
set(sublabel "")
set(tmpsublabel "")
foreach(_itrx ${${listname}})
if ("${_itrx}" MATCHES "^Sublabel:")
set(sublabel "")
set(tmpsublabel "")
string(REGEX REPLACE "^Sublabel:[ \t]*" "" _itrlabels ${_itrx})
string(REGEX MATCHALL "([a-zA-Z]+)" _labels ${_itrlabels})
foreach(subl ${_labels})
if (subl STREQUAL "RESET")
set(sublabel "")
set(tmpsublabel "")
else()
list(APPEND sublabel ${subl})
list(APPEND tmpsublabel ${subl})
endif()
endforeach()
# remove doubles in sublabel
list(REMOVE_DUPLICATES sublabel)
list(REMOVE_DUPLICATES tmpsublabel)
else()
set(_itr "^${_itrx}$")
if (${testname} MATCHES "${_itr}")
@ -89,8 +89,8 @@ macro(findexpr found testname listname rsublabel)
endif()
endforeach()
if (${_found})
if (NOT "${sublabel}" STREQUAL "")
set(${rsublabel} ${sublabel})
if (NOT "${tmpsublabel}" STREQUAL "")
list(APPEND ${rsublabel} ${tmpsublabel})
endif()
endif()
set(${found} ${_found})
@ -101,55 +101,60 @@ function(join rvalues glue routput)
set(${routput} ${out} PARENT_SCOPE)
endfunction()
macro(maketestname testname reverted listreverted listignored listunreliable listlabels)
macro(maketestname testname reverted listsuspicious listignored listunreliable listlabels)
set(sublabel "")
string(REGEX MATCH "\\/[a-z][a-z](_[A-Z][A-Z])?\\/" _v ${${testname}})
if(_v)
string(REGEX REPLACE "\\/" "" _v ${_v})
set(listrevertedx ${listreverted}_${_v})
set(listsuspiciousx ${listsuspicious}_${_v})
set(listignoredx ${listignored}_${_v})
set(listunreliablex ${listunreliable}_${_v})
else()
set(listrevertedx ${listreverted})
set(listsuspiciousx ${listsuspicious})
set(listignoredx ${listignored})
set(listunreliablex ${listunreliable})
endif()
findexpr(mfound ${testname} ${listignoredx} sublabel)
if (NOT mfound)
# check if they are unreliable
string(REGEX MATCH "_(systemF|texF|pdf3|pdf2|pdf|dvi|lyx16|xhtml)$" _v ${${testname}})
set(sublabel "")
findexpr(nsfound ${testname} ${listunreliablex} sublabel)
if (nsfound)
if (NOT "${sublabel}" STREQUAL "")
# check if test _may_ be in listsuspicious
if (_v)
findexpr(mfound ${testname} ${listsuspiciousx} sublabel)
else()
set(mfound OFF)
endif()
if (NOT mfound)
set(${reverted} 0)
else()
# Now that the test is suspect,
# check if it is unreliable, and/or suspended
set(sublabel2 "")
findexpr(nsfound ${testname} ${listunreliablex} sublabel2)
findexpr(nsfound2 ${testname} suspendedTests sublabel2)
list(APPEND sublabel ${sublabel2})
if (nsfound)
set(sublabel "unreliable" ${sublabel})
endif()
if (nsfound2)
set(sublabel "suspended" ${sublabel})
message(STATUS "found suspended test ${${testname}}")
endif()
list(REMOVE_DUPLICATES sublabel)
if (nsfound OR nsfound2)
list(APPEND ${listlabels} ${sublabel})
join(sublabel "." tmpprefixx)
string(TOUPPER "${tmpprefixx}_" tmpprefix)
else()
set(tmpprefix "")
endif()
set(${testname} "UNRELIABLE.${tmpprefix}${${testname}}")
else ()
string(REGEX MATCH "_(systemF|texF|pdf3|pdf2|pdf|dvi|lyx16|xhtml)$" _v ${${testname}})
set(sublabel "")
# check if test _may_ be in listreverted
if (_v)
findexpr(mfound ${testname} ${listrevertedx} sublabel)
else()
set(mfound OFF)
endif()
if (NOT mfound)
set(${reverted} 0)
else()
set(sublabel "reverted" ${sublabel})
set(${reverted} 1)
if (NOT sublabel STREQUAL "")
string(TOUPPER "${sublabel}_" tmpprefix)
else()
set(tmpprefix "ctest_")
endif()
set(${testname} "INVERTED_SEE-README.${tmpprefix}${${testname}}")
if (NOT sublabel STREQUAL "")
list(APPEND ${listlabels} ${sublabel})
endif()
endif()
join(sublabel "." tmpprefixx)
string(TOUPPER "${tmpprefixx}_" tmpprefix)
set(${testname} "${tmpprefix}${${testname}}")
string(TOUPPER "${sublabel}_" tmpprefix)
if (NOT sublabel STREQUAL "")
list(APPEND ${listlabels} ${sublabel})
list(FIND ${listlabels} "chemgreek" _i)
endif()
endif()
else()
@ -227,7 +232,7 @@ macro(loadTestList filename resList)
endforeach()
endmacro()
loadTestList(revertedTests revertedTests)
loadTestList(suspiciousTests suspiciousTests)
loadTestList(ignoredTests ignoredTests)
loadTestList(suspendedTests suspendedTests)
loadTestList(unreliableTests unreliableTests)
@ -292,7 +297,7 @@ foreach(libsubfolderx lib/doc lib/examples lib/templates development/mathmacros
string(REGEX REPLACE "\\.lyx$" "" f ${f})
set(TestName "export/${libsubfolder}/${f}_lyx16")
set(mytestlabel ${testlabel})
maketestname(TestName reverted revertedTests ignoredTests unreliableTests mytestlabel)
maketestname(TestName reverted suspiciousTests ignoredTests unreliableTests mytestlabel)
if(TestName)
add_test(NAME ${TestName}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
@ -315,7 +320,7 @@ foreach(libsubfolderx lib/doc lib/examples lib/templates development/mathmacros
# For use of lyx2lyx we need the python executable
set(mytestlabel ${lyx2lyxtestlabel})
set(TestName "lyx2lyx/${libsubfolder}/${f}")
maketestname(TestName reverted revertedTests ignoredTests unreliableTests mytestlabel)
maketestname(TestName reverted suspiciousTests ignoredTests unreliableTests mytestlabel)
if(TestName)
add_test(NAME ${TestName}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
@ -331,7 +336,7 @@ foreach(libsubfolderx lib/doc lib/examples lib/templates development/mathmacros
set(loadtestlabel "load")
set(mytestlabel ${loadtestlabel})
set(TestName "check_load/${libsubfolder}/${f}")
maketestname(TestName reverted revertedTests ignoredTests unreliableTests mytestlabel)
maketestname(TestName reverted suspiciousTests ignoredTests unreliableTests mytestlabel)
if(TestName)
add_test(NAME ${TestName}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
@ -358,7 +363,7 @@ foreach(libsubfolderx lib/doc lib/examples lib/templates development/mathmacros
set(TestName "export/${libsubfolder}/${f}_${format}_${fonttype}")
endif()
set(mytestlabel ${testlabel})
maketestname(TestName reverted revertedTests ignoredTests unreliableTests mytestlabel)
maketestname(TestName reverted suspiciousTests ignoredTests unreliableTests mytestlabel)
if(TestName)
add_test(NAME ${TestName}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"

View File

@ -1,2 +1,2 @@
INV.*(dvi3|pdf4|pdf5)_texF
INV.*/attic/.*F
.*(dvi3|pdf4|pdf5)_texF
.*/attic/.*F

View File

@ -0,0 +1,225 @@
# Comments by Günter Milde (GM)
#
# Some references and keys contain non-ascii chars
export/doc/es/UserGuide_(dvi3|pdf[45])_texF
#
# Hebrew docs do not currently work with LuaTeX
export/.*/he/(Intro|Tutorial|example).*(pdf5|dvi3)_.*
export/.*/he/(splash).*(dvi3)_.*
export/examples/he/splash_pdf5_texF
#
# FIXME
# After LyX 2.1 is released, apply the patch and remove these
# See http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg181595.html
export/.*/id/.*(dvi3)_.*
export/.*/id/.*(pdf5)_texF
export/doc/id/UserGuide_pdf5_systemF
#
# FIXME
# Similar to the Indonesian support, see:
# http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg181595.html
export/.*/hu/.*(dvi3)_.*
export/.*/hu/.*(pdf5)_texF
#
export/.*/es/europeCV_pdf_texF
#
# somehow lualatex is not able to compile with non-tex fonts
export/.*/es/(Math|Tutorial|UserGuide|ejemplo_con_lyx)_dvi3_systemF
# See http://www.lyx.org/trac/ticket/8823
export/examples/ja/(lilypond|sweave|knitr)_pdf
#
# There is no non-TeX support for Ukrainian with LuaTeX. See:
# https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg181690.html
export/doc/uk/Intro_dvi3_systemF
#
# The following documents likely fail because of excessive preamble code that
# is only targeted at (pdf)latex. TODO these .lyx files could be fixed. Although
# it is unlikely that a user would want to use system fonts to view LyX's
# documents, fixing these would provide further tests for LyX's handling of
# XeTeX/LuaTeX with system fonts.
export/doc/(de/|es/|fr/)Customization_pdf4_systemF
export/doc/(es/|fr/)Math_dvi3_systemF
export/doc/(es|fr|id)/UserGuide_pdf4_systemF
export/doc/es/Tutorial_pdf4_systemF
export/doc/gl/Tutorial_dvi3_systemF
export/doc/(nb|sk)/Intro_pdf4_systemF
export/examples/eu/adibide_lyx-atua_(dvi3)_systemF
export/examples/fr/(ListesPuces|seminar)_pdf4_systemF
export/examples/gl/exemplo_lyxificado_(dvi3)_systemF
export/templates/RJournal_(dvi3|pdf[45])_systemF
# Changes in TeX Live 2014 (see git blame for info) fixed IEEEtran-CompSoc
# pdf4_systemF but not others. TODO Investigate if others can be fixed?
export/templates/IEEEtran-(Journal|TransMag)_pdf4_systemF
#
# There is no Chinese LuaTeX or XeTeX TeX font support yet.
export/.*/zh_CN/.*(pdf[45]|dvi3)_texF
#
# These started failing after we implemented tests for formats
# that are in the complement set to the default format (7ecbb068).
# TODO it might be worth it to take a look at each individually and
# see whether they are supposed to fail or if there is something LyX
# can do to add support for exporting them.
export/doc/hu/Tutorial_dvi3_.*F
export/examples/(chessgame|chess-article|powerdot-example)_pdf[25].*
export/examples/(docbook_article)_(pdf[245]|dvi3).*
export/examples/instant_preview_(dvi3|pdf4)_systemF
export/examples/instant_preview_pdf[25].*
export/examples/listerrors_(pdf[245]).*
export/examples/(|de/|es/)tufte-(book|handout)_(dvi.*|pdf|pdf3|pdf4.*)
export/examples/fr/exemple-powerdot_pdf[25].*
export/examples/fr/exemple-powerdot_pdf
export/examples/powerdot-example_pdf
export/examples/ja/(knitr|lilypond|sweave)_(dvi|pdf3)
export/examples/ko/splash_(dvi||pdf[23]?)
export/templates/DocBook_article_(dvi3_|pdf2|pdf[45]_).*
export/templates/JSS-article_(dvi|dvi3_.*|pdf3?)
export/templates/attic/latex8_(dvi|dvi3_.*)
export/templates/ctex_(pdf[23]?|pdf4_texF)
#
# The following exports worked with TeX Live 2013, but not in 2014.
# For a workaround, see:
# https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg184435.html
export/examples/aa_sample_(dvi3|pdf4|pdf5)_(texF|systemF)
export/templates/aa_(dvi3|pdf4|pdf5)_(texF|systemF)
#
# These exports correctly fail now on TeX Live 2014. Although they compiled
# without error on TeX Live 2013, the resulting PDFs had gibberish.
export/doc/he/(Intro|Tutorial)_pdf4_texF
export/examples/he/(example_lyxified|example_raw|splash)_pdf4_texF
#
# GM: False positive: if the font is e.g. set to
# LinuxLibertine and LinuxBiolinum, there are no missing characters but
# polyglossia anyway throws the error:
#
# ! Package polyglossia Error: The current roman font does not contain the
# Hebrew script!
export/examples/he/splash_pdf5_systemF
#
# These exports correctly fail now that we've switched to polyglossia. Although
# they compiled without error with babel, the resulting PDFs had gibberish.
# Note that there is a problem with the LyX-generated preamble in the Russian
# docs:
# https://www.mail-archive.com/search?l=mid&q=n0j157%246a1%241%40ger.gmane.org
export/doc/ru/Intro_pdf5_systemF
export/doc/ru/Tutorial_pdf5_systemF
#
# Inside these two files, we state that they should only be expected
# to work with pdflatex and possibly lualatex.
export/examples/PDF-(form)_(dvi.*|pdf[^25]*)
# PDF comments in DVI? No wonder we have:
# ! Package zref Error: \pdfsavepos is not supported in DVI mode
export/examples/(|de/|fr/)PDF-comment_dvi3_.*F
#
export/templates/IUCr-article_pdf4_systemF
#
# Gives the following error:
# # ! Package hpstatement Error: H or P statement "H251"
# # (hpstatement) is not defined.
# 1580:export/examples/H-P-statements_pdf5_systemF
export/examples/H-P-statements_pdf[45]_systemF
#
# The math document now depends on the mhchem package which produces wrong
# output with XeTeX/LuaTeX and both TeX fonts and non-TeX fonts:
# https://www.mail-archive.com/search?l=mid&q=n0sne9%24iis%241%40ger.gmane.org
export/doc(|/de|/es|/fr)/Math.*systemF
export/doc/(|de/|es/|fr/)Math_(dvi3|pdf5)_texF
#
# GM: Example of "high bit" chars in listings. Fails with XeTeX due ot
# limiation to ASCII (no LICR in listings possible). Gives correct warning.
export/doc/EmbeddedObjects_pdf4_systemF
#
# GM: Non-ASCII char in verbatim environment.
# Fails with ASCII (and hence also with XeTeX).
export/doc/UserGuide_pdf4_texF
#
# TODO: We need to determine the correct reason for failure (most probably
# incompatible packages, maybe also loading of lmodern.sty in the user
# preamble) or state that we don't know it.
export/doc/de/(Additional|UserGuide)_pdf4_texF
export/doc/de/(Customization_pdf5|EmbeddedObjects_pdf4)_systemF
#
# GM: Seems to be a case of the polyglossia + language-nesting problem
export/doc/es/Customization_pdf[45]_systemF
export/doc/es/Additional_pdf4_texF
#
# GM: Files in the attic with changed settings
# (i.e. could be ERT, package incompatiblity, ...)
export/doc/attic/it_(Customization_pdf5|UserGuide_dvi3|UserGuide_pdf4)_systemF
export/doc/attic/sk_UserGuide_pdf4_texF
#
# GM: Don't know what is to be expected with indices and Xe/Lua
export/doc/es/EmbeddedObjects_(dvi3|pdf[45])_texF
#
# GM: Babel's Russian language definition file has the same
# problem as LyX 2.0: it does not care for the combi Xe/Lua + TeX fonts: after
# testing the engine, it switches to "unicode modus".
export/examples/(ru|uk)/splash_(dvi3|pdf[45])_texF
#
# GM: Babel-Spanish uses Babel's "strings" feature to define
# separate auto-strings using UTF-8 literals.
#
# Babel uses the "unicode" strings if it detects XeTeX or LuaTeX.
# This is wrong for Xe/Lua with 8-bit TeX-fonts.
# (It can be overridden adding the "strings=generic" option to Babel.)
# for now inverted
export/examples/es/linguistics_pdf4_texF
export/examples/linguistics_(dvi3|pdf[45])_systemF
#
# GM: Missing character: There is no 砋 (U+780B) in font
# "file:lmroman10-regular:script=latn;+trep;+tlig;"!
# Character '砋' (30731, 0x780B) is not in my list of known Unicode points,
# don't know where it comes from. On first inspection, the output looks OK.
# Explore later.
export/examples/(|es/)(europe|modern)CV_(dvi3|pdf5)_(texF|systemF)
#
# GM: * lmodern.sty
# * missing commands and missing characters
export/doc/es/(EmbeddedObjects_pdf4|UserGuide_pdf5)_systemF
#
# GM: Non-ASCII in ERT
export/doc/fr/Additional_pdf4_texF
#
# GM: Non-ASCII in verbatim and index entries
export/doc/fr/UserGuide_pdf4_texF
#
# GM: lmodern.sty? + maybe more
export/doc/fr/(Additional_pdf5|Customization_pdf5|EmbeddedObjects_pdf4|UserGuide_pdf5)_systemF
#
# GM: language nesting error (polyglossia) (known bug)
export/doc/nb/Intro_pdf5_systemF
#
# GM: Babel-Russian uses UTF-8 for auto-strings if it detects Xe/LuaTeX.
# This fails unless the inputencoding is set to utf-8, too.
export/doc/ru/(Intro|Tutorial)_(dvi3|pdf[45])_texF
export/doc/(ru|uk)/splash_(dvi3|pdf[45])_texF
#
# GM: chemgreek incompatible with LuaTeX (cf. Math.lyx)
# for now inverted
Sublabel: chemgreek
export/doc/sk/Intro_pdf5_systemF
export/examples/(|de/|fr/)PDF-comment_pdf5_texF
export/examples/aas_sample_(dvi3|pdf5)_(texF|systemF)
export/examples/achemso_(dvi3|pdf5)_texF
Sublabel: RESET
#
# GM: * seminar uses Postscript specials and does not work with PDF (pdflatex).
# * Landscape slides do not work with DVI.
# Export to certain formats cannot be excluded from a module currently,
# but even if they don't report an error, other formats result in corrupt
# output documents (missing landscape slides).
export/examples/(|fr/)seminar_pdf(2|[45]_systemF)
#
# GM: Korean? I don't expect this to work with Xe/Lua and TeXfonts.
export/examples/ko/splash_(dvi3|pdf[45])_texF
#
# Following mathmacros tests fail
export/mathmacros/testcases_master_child_.*
export/mathmacros/testcases_speed_(dvi|pdf|pdf[23]|(dvi3|pdf[45])_(texF|systemF))
# Language nesting, document is OK, fails because of a bug in LyX
export/export/languagenesting1_lyx16
export/export/languagenesting1_dvi
export/export/languagenesting1_pdf
export/export/languagenesting1_pdf2
export/export/languagenesting1_pdf3