mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Cmake export tests: More tests to be inverted, suspended or made non-standard
All comments in revertedTests comes from Günter Milde Non standard test is new. It should collect all tests which may not work because of some missing non-standard tex package or some exotic system font.
This commit is contained in:
parent
dd6340cfcc
commit
3d766ad241
@ -75,32 +75,38 @@ macro(findexpr found testname listname)
|
||||
set(${found} ${_found})
|
||||
endmacro()
|
||||
|
||||
macro(maketestname testname reverted listreverted listignored)
|
||||
macro(maketestname testname reverted listreverted listignored listnonstandard)
|
||||
string(REGEX MATCH "\\/[a-z][a-z](_[A-Z][A-Z])?\\/" _v ${${testname}})
|
||||
if(_v)
|
||||
string(REGEX REPLACE "\\/" "" _v ${_v})
|
||||
set(listrevertedx ${listreverted}_${_v})
|
||||
#message(STATUS "${listreverted} ==> ${listrevertedx}")
|
||||
set(listignoredx ${listignored}_${_v})
|
||||
#message(STATUS "${listignored} ==> ${listignoredx}")
|
||||
set(listnonstandardx ${listnonstandard}_${_v})
|
||||
else()
|
||||
set(listrevertedx ${listreverted})
|
||||
set(listignoredx ${listignored})
|
||||
set(listnonstandardx ${listnonstandard})
|
||||
endif()
|
||||
findexpr(mfound ${testname} ${listignoredx})
|
||||
if (NOT mfound)
|
||||
# check if test _may_ be in listreverted
|
||||
string(REGEX MATCH "_(systemF|texF|pdf3|pdf2|pdf|dvi)$" _v ${${testname}})
|
||||
if (_v)
|
||||
findexpr(mfound ${testname} ${listrevertedx})
|
||||
else()
|
||||
set(mfound OFF)
|
||||
endif()
|
||||
if (NOT mfound)
|
||||
set(${reverted} 0)
|
||||
else()
|
||||
set(${reverted} 1)
|
||||
set(${testname} "INVERTED_SEE-README.ctest_${${testname}}")
|
||||
# check if they are non-standard
|
||||
findexpr(nsfound ${testname} ${listnonstandardx})
|
||||
if (nsfound)
|
||||
set(${testname} "NON_STANDARD.${${testname}}")
|
||||
else ()
|
||||
string(REGEX MATCH "_(systemF|texF|pdf3|pdf2|pdf|dvi)$" _v ${${testname}})
|
||||
# check if test _may_ be in listreverted
|
||||
if (_v)
|
||||
findexpr(mfound ${testname} ${listrevertedx})
|
||||
else()
|
||||
set(mfound OFF)
|
||||
endif()
|
||||
if (NOT mfound)
|
||||
set(${reverted} 0)
|
||||
else()
|
||||
set(${reverted} 1)
|
||||
set(${testname} "INVERTED_SEE-README.ctest_${${testname}}")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
set(${testname} "")
|
||||
@ -138,10 +144,12 @@ endmacro()
|
||||
loadTestList(revertedTests revertedTests)
|
||||
loadTestList(ignoredTests ignoredTests)
|
||||
loadTestList(suspendedTests suspendedTests)
|
||||
loadTestList(nonstandardTests nonstandardTests)
|
||||
|
||||
macro(handlesuspended TestName reverted testlabel)
|
||||
set(mylabel ${testlabel})
|
||||
set(myreverted ${reverted})
|
||||
|
||||
if (${reverted})
|
||||
# check suspension only for reverted tests
|
||||
findexpr(tfound TestName suspendedTests)
|
||||
@ -149,6 +157,11 @@ macro(handlesuspended TestName reverted testlabel)
|
||||
set(mylabel "suspended")
|
||||
set(myreverted 0) # if test is to be suspended, remove the 'reverted' flag
|
||||
endif()
|
||||
else ()
|
||||
# check for nonstandard
|
||||
if ("${TestName}" MATCHES "^NON_STANDARD")
|
||||
set(mylabel "nonstandard")
|
||||
endif()
|
||||
endif()
|
||||
setmarkedtestlabel(${TestName} ${myreverted} ${mylabel})
|
||||
endmacro()
|
||||
@ -175,7 +188,7 @@ foreach(libsubfolderx lib/doc lib/examples lib/templates)
|
||||
# Strip extension
|
||||
string(REGEX REPLACE "\\.lyx$" "" f ${f})
|
||||
set(TestName "export/${libsubfolder}/${f}_lyx16")
|
||||
maketestname(TestName reverted revertedTests ignoredTests)
|
||||
maketestname(TestName reverted revertedTests ignoredTests nonstandardTests)
|
||||
if(TestName)
|
||||
add_test(NAME ${TestName}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
|
||||
@ -196,7 +209,7 @@ foreach(libsubfolderx lib/doc lib/examples lib/templates)
|
||||
if(LYX_PYTHON_EXECUTABLE)
|
||||
# For use of lyx2lyx we need the python executable
|
||||
set(TestName "lyx2lyx/${libsubfolder}/${f}")
|
||||
maketestname(TestName reverted revertedTests ignoredTests)
|
||||
maketestname(TestName reverted revertedTests ignoredTests nonstandardTests)
|
||||
if(TestName)
|
||||
add_test(NAME ${TestName}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
|
||||
@ -210,7 +223,7 @@ foreach(libsubfolderx lib/doc lib/examples lib/templates)
|
||||
endif()
|
||||
endif()
|
||||
set(TestName "check_load/${libsubfolder}/${f}")
|
||||
maketestname(TestName reverted revertedTests ignoredTests)
|
||||
maketestname(TestName reverted revertedTests ignoredTests nonstandardTests)
|
||||
if(TestName)
|
||||
add_test(NAME ${TestName}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
|
||||
@ -236,7 +249,7 @@ foreach(libsubfolderx lib/doc lib/examples lib/templates)
|
||||
else()
|
||||
set(TestName "export/${libsubfolder}/${f}_${format}_${fonttype}")
|
||||
endif()
|
||||
maketestname(TestName reverted revertedTests ignoredTests)
|
||||
maketestname(TestName reverted revertedTests ignoredTests nonstandardTests)
|
||||
if(TestName)
|
||||
add_test(NAME ${TestName}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
|
||||
|
@ -4,4 +4,5 @@
|
||||
# latex8.sty is obsolete and replaced by IEEEconf.
|
||||
check_load/templates/attic/latex8
|
||||
export/templates/attic/latex8_pdf.*
|
||||
exportt/.*/ko[/_].*_texF
|
||||
#
|
||||
|
@ -247,8 +247,7 @@ sub checkForPreamble($)
|
||||
my $comments = newMatch("search" => '^([^%]*)([%]+)([^%]*)$',
|
||||
"filetype" => "replace_only",
|
||||
"result" => ["1", "2"]);
|
||||
#setMatching([$rElem, $comments]);
|
||||
setMatching([$rElem]);
|
||||
setMatching([$rElem, $comments]);
|
||||
return(1);
|
||||
}
|
||||
return(0);
|
||||
|
5
development/autotests/nonstandardTests
Normal file
5
development/autotests/nonstandardTests
Normal file
@ -0,0 +1,5 @@
|
||||
# Tests using some non-standard tex class
|
||||
export/templates/IUCr-article_(dvi|pdf).*
|
||||
export/templates/es_beamer-conference-ornate-20min_pdf4_texF
|
||||
export/templates/kluwer_pdf5_systemF
|
||||
export/templates/kluwer_pdf[45]_systemF
|
@ -134,3 +134,16 @@ export/doc/de/(Customization_pdf5|EmbeddedObjects_pdf4)_systemF
|
||||
# Seems to be a case of the polyglossia + language-nesting problem
|
||||
export/doc/es/Customization_pdf[45]_systemF
|
||||
export/doc/es/Additional_pdf4_texF
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# Don't know what is to be expected with indices and Xe/Lua
|
||||
export/doc/es/EmbeddedObjects_(dvi3|pdf[45])_texF
|
||||
#
|
||||
# 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
|
@ -1 +1,2 @@
|
||||
INV.*(dvi3|pdf4|pdf5)_texF
|
||||
INV.*/attic/.*F
|
||||
|
Loading…
Reference in New Issue
Block a user