From 36aa0526e08fb6b91c039539eb3911f14c9905dc Mon Sep 17 00:00:00 2001 From: Kornel Benko Date: Thu, 3 Jan 2019 08:46:26 +0100 Subject: [PATCH] lyx2lyx tests: Copy also original lyx files to temp dir Necessary only if the lyx-file includes some data from a relative path, nonetheless it happens in some of our tests. --- development/autotests/export.cmake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/development/autotests/export.cmake b/development/autotests/export.cmake index fc63cd47c8..f4bb44bec6 100755 --- a/development/autotests/export.cmake +++ b/development/autotests/export.cmake @@ -64,8 +64,16 @@ if(format MATCHES "dvi|pdf") endif() set(result_file_name ${file}_${_ft}.${extension}) else() - message(STATUS "Not converting") - set(LYX_SOURCE "${LYX_ROOT}/${file}.lyx") + message(STATUS "Converting with perl ${Perl_Script}") + set(LYX_SOURCE "${TempDir}/${file}.lyx") + message(STATUS "Using source \"${LYX_ROOT}/${file}.lyx\"") + message(STATUS "Using dest \"${LYX_SOURCE}\"") + execute_process(COMMAND ${PERL_EXECUTABLE} "${Perl_Script}" "${LYX_ROOT}/${file}.lyx" "${LYX_SOURCE}" ${format} "default" "default" ${LanguageFile} + RESULT_VARIABLE _err) + string(COMPARE EQUAL ${_err} 0 _erg) + if(NOT _erg) + message(FATAL_ERROR "Export failed while converting") + endif() if(extension MATCHES "\\.lyx$") # Font-type not relevant for lyx16/lyx21 exports set(result_file_base ${file})