Cmake export tests: Introduce 'LYX_DEBUG_LATEX' environment variable.

Setting this variable to '1' will include also latex messages in
ctest log file LastTest.log.
This commit is contained in:
Kornel Benko 2016-10-12 14:35:23 +02:00
parent 892593fbdc
commit 90adb4f314
2 changed files with 20 additions and 6 deletions

View File

@ -126,10 +126,15 @@ if (extension MATCHES "\\.lyx$")
set(LYX_SOURCE ${result_file_name})
endforeach()
else()
message(STATUS "Executing ${lyx} -userdir \"${LYX_TESTS_USERDIR}\" -E ${format} ${result_file_name} \"${LYX_SOURCE}\"")
if ($ENV{LYX_DEBUG_LATEX})
set(LatexDebugParam -dbg latex)
else()
set(LatexDebugParam)
endif()
message(STATUS "Executing ${lyx} ${LatexDebugParam} -userdir \"${LYX_TESTS_USERDIR}\" -E ${format} ${result_file_name} \"${LYX_SOURCE}\"")
file(REMOVE ${result_file_name})
execute_process(
COMMAND ${lyx} -userdir "${LYX_TESTS_USERDIR}" -E ${format} ${result_file_name} "${LYX_SOURCE}"
COMMAND ${lyx} ${LatexDebugParam} -userdir "${LYX_TESTS_USERDIR}" -E ${format} ${result_file_name} "${LYX_SOURCE}"
RESULT_VARIABLE _err)
#check if result file created

View File

@ -1,5 +1,5 @@
#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 512
\begin_document
\begin_header
\save_transient_properties true
@ -25,6 +25,7 @@ logicalmkup
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\use_microtype false
\graphics default
\default_output_format pdf2
\output_sync 1
@ -3403,7 +3404,15 @@ unreliable:nonstandard
or testing on a system with only a subset of TeXLive installed), ignore
the failure, ask for someone else to run the test, or install the missing
ressources and try again.
resources and try again.
\end_layout
\begin_layout Itemize
Check the log file Testing/Temporary/LastTest.log.
In case of latex-errors rerun the failing test with environment variable
'LAX_DEBUG_LATEX' set to '1'.
This will include latex messages in LastTest.log, so it should be easier
to interpret the fail-reason.
\end_layout
\begin_layout Paragraph