Add label 'defaultoutput' to export tests using document default output format

This commit is contained in:
Kornel Benko 2017-03-10 14:32:21 +01:00
parent e2f2915f8e
commit c99e2f1fad

View File

@ -48,7 +48,7 @@ macro(initLangVars varname)
endforeach()
endmacro()
macro(getoutputformats filepath varname)
macro(getoutputformats filepath varname format_set)
file(STRINGS "${filepath}" lines)
# What should we test, if default_output_format is not defined?
# For now we test everything ...
@ -58,7 +58,9 @@ macro(getoutputformats filepath varname)
set(_format ${CMAKE_MATCH_1})
if(_format STREQUAL "default")
set(out_formats "xhtml" ${DVI_FORMATS} ${PDF_FORMATS})
elseif(_format STREQUAL "pdf2" AND "${filepath}" MATCHES "/doc/")
else()
set(${format_set} ${_format})
if(_format STREQUAL "pdf2" AND "${filepath}" MATCHES "/doc/")
set(out_formats "xhtml" ${DVI_FORMATS} ${PDF_FORMATS})
elseif(_format MATCHES "pdf$")
set(out_formats "xhtml" ${PDF_FORMATS})
@ -71,6 +73,7 @@ macro(getoutputformats filepath varname)
# like "eps3"
set(out_formats "xhtml" ${_format})
endif()
endif()
break()
endif()
endforeach()
@ -377,7 +380,8 @@ foreach(libsubfolderx autotests/export lib/doc lib/examples lib/templates autote
setmarkedtestlabel(${TestName} ${mytestlabel})
#set_tests_properties(${TestName} PROPERTIES RUN_SERIAL ON)
endif()
getoutputformats("${LIBSUB_SRC_DIR}/${f}.lyx" formatlist)
set(default_output_format)
getoutputformats("${LIBSUB_SRC_DIR}/${f}.lyx" formatlist default_output_format)
foreach(format ${formatlist})
if(format MATCHES "dvi3|pdf4|pdf5")
set(fonttypes "texF" "systemF")
@ -419,12 +423,17 @@ foreach(libsubfolderx autotests/export lib/doc lib/examples lib/templates autote
else()
set(TestName "export/${libsubfolder}/${f}${_enc}_${format}_${fonttype}")
endif()
if (format MATCHES "^${default_output_format}$")
set(extraLabels "defaultoutput")
else()
set(extraLabels )
endif()
set(missingLabels )
findexpr(mfound TestName ignoreLatexErrorsTests missingLabels)
if (mfound)
set(mytestlabel ${testlabel} "ignoring" ${missingLabels})
set(mytestlabel ${testlabel} "ignoring" ${missingLabels} ${extraLabels})
else()
set(mytestlabel ${testlabel})
set(mytestlabel ${testlabel} ${extraLabels})
endif()
maketestname(TestName inverted invertedTests ignoredTests unreliableTests mytestlabel)
if(TestName)