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.
This commit is contained in:
Kornel Benko 2019-01-03 08:46:26 +01:00
parent af7dba023b
commit 36aa0526e0

View File

@ -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})