mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
fc33092fd8
a) test export/templates/ectaart_pdf5 removed, because of incompatibility between ectart.cls and luatex.sty b) renamed some tests to reflect their purpose tex2lyx2lyx/roundtrip/ => tex2lyx/cmplyx/ # the tests are comparing files written by lyx (not by tex2lyx) autotests/ => keytest/ # we are testing reactions of lyx to some key strokes c) add tests for lyx2lyx. This is rather rudimental, in that it only checks for created output, error codes and error output. d) use correct environment variable to set up the userdir for testing
41 lines
1.2 KiB
CMake
Executable File
41 lines
1.2 KiB
CMake
Executable File
# This file is part of LyX, the document processor.
|
|
# Licence details can be found in the file COPYING.
|
|
#
|
|
# Copyright (c) 2012 Kornel Benko kornel@lyx.org
|
|
#
|
|
#
|
|
# LYX_ROOT = ${TOP_SRC_DIR}/lib/{doc,examples,templates}
|
|
# LYX_USERDIR_VER = Name of environment variable for the user directory
|
|
# lyx =
|
|
# format = lyx16x|xhtml
|
|
# extension = 16.lyx|xhtml
|
|
# file = xxx
|
|
#
|
|
# Script should be called like:
|
|
# cmake -DLYX_ROOT=xxx \
|
|
# -DWORKDIR=${BUILD_DIR}/autotests/out-home \
|
|
# -DLYX_USERDIR_VER=${LYX_USERDIR_VER} \
|
|
# -Dlyx=xxx \
|
|
# -Dformat=xxx \
|
|
# -Dextension=xxx \
|
|
# -Dfile=xxx \
|
|
# -Dreverted=[01] \
|
|
# -P "${TOP_SRC_DIR}/development/autotests/export.cmake"
|
|
#
|
|
|
|
message(STATUS "Executing ${lyx} -E ${format} ${file}.${extension} ${LYX_ROOT}/${file}.lyx")
|
|
set(ENV{${LYX_USERDIR_VER}} "${WORKDIR}/.lyx")
|
|
execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${file}.${extension})
|
|
execute_process(
|
|
COMMAND ${lyx} -E ${format} ${file}.${extension} "${LYX_ROOT}/${file}.lyx"
|
|
RESULT_VARIABLE _err)
|
|
if(reverted)
|
|
string(COMPARE EQUAL ${_err} 0 _erg)
|
|
else()
|
|
string(COMPARE NOTEQUAL ${_err} 0 _erg)
|
|
endif()
|
|
if(_erg)
|
|
message(STATUS "Exporting ${f}.lyx to ${format}")
|
|
message(FATAL_ERROR "Export failed")
|
|
endif()
|