commit eec3d1eb203a3cc6eb3b23b623756cf0962344cd
Author: Kornel Benko <[email protected]>
Date: Thu Jan 3 08:46:26 2019 +0100
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 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/development/autotests/export.cmake
b/development/autotests/export.cmake
index 4386660..913492d 100755
--- a/development/autotests/export.cmake
+++ b/development/autotests/export.cmake
@@ -65,8 +65,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})