mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 05:01:49 +00:00
Cmake build: Prepare lyx2lyx tests to use the python executable found at configure time
This commit is contained in:
parent
94956d391a
commit
f36ea42b5e
@ -192,17 +192,22 @@ foreach(libsubfolder doc examples templates)
|
||||
-P "${TOP_SRC_DIR}/development/autotests/export.cmake")
|
||||
setmarkedtestlabel(${TestName} ${reverted} "export")
|
||||
endif()
|
||||
if(LYX_PYTHON_EXECUTABLE)
|
||||
# For use of lyx2lyx we need the python executable
|
||||
set(TestName "lyx2lyx/${libsubfolder}/${f}")
|
||||
maketestname(TestName reverted revertedTests ignoredTests)
|
||||
if(TestName)
|
||||
add_test(NAME ${TestName}
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
|
||||
COMMAND ${CMAKE_COMMAND} -DLYX2LYX=${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx
|
||||
-DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR}
|
||||
-DLYXFILE=${LIBSUB_SRC_DIR}/${f}.lyx
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
"-DLYX_PYTHON_EXECUTABLE=${LYX_PYTHON_EXECUTABLE}"
|
||||
"-DLYX2LYX=${TOP_SRC_DIR}/lib/lyx2lyx/lyx2lyx"
|
||||
"-DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR}"
|
||||
"-DLYXFILE=${LIBSUB_SRC_DIR}/${f}.lyx"
|
||||
-P "${TOP_SRC_DIR}/development/autotests/lyx2lyxtest.cmake")
|
||||
setmarkedtestlabel(${TestName} ${reverted} "export")
|
||||
endif()
|
||||
endif()
|
||||
set(TestName "check_load/${libsubfolder}/${f}")
|
||||
maketestname(TestName reverted revertedTests ignoredTests)
|
||||
if(TestName)
|
||||
|
@ -8,7 +8,8 @@
|
||||
# LYXFILE = xxx
|
||||
#
|
||||
# Script should be called like:
|
||||
# cmake -DLYX2LYX=xxx \
|
||||
# cmake -DLYX_PYTHON_EXECUTABLE=xxx \
|
||||
# -DLYX2LYX=xxx \
|
||||
# -DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR} \
|
||||
# -DWORKDIR=${BUILD_DIR}/autotests/out-home \
|
||||
# -DLYXFILE=xxx \
|
||||
@ -17,9 +18,9 @@
|
||||
|
||||
string(RANDOM LENGTH 5 errorfile)
|
||||
string(RANDOM LENGTH 6 outputfile)
|
||||
message(STATUS "Executing ${LYX2LYX} -e ${errorfile} -o ${outputfile} ${LYXFILE}")
|
||||
message(STATUS "Executing ${LYX_PYTHON_EXECUTABLE} ${LYX2LYX} -e ${errorfile} -o ${outputfile} ${LYXFILE}")
|
||||
execute_process(
|
||||
COMMAND ${LYX2LYX} -e ${errorfile} -o ${outputfile} ${LYXFILE}
|
||||
COMMAND ${LYX_PYTHON_EXECUTABLE} ${LYX2LYX} -e ${errorfile} -o ${outputfile} ${LYXFILE}
|
||||
RESULT_VARIABLE _err)
|
||||
|
||||
message(STATUS "Error output of lyx2lyx = ${_err}")
|
||||
|
Loading…
Reference in New Issue
Block a user