1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
4 # Copyright (c) 2012 Kornel Benko, <kornel@lyx.org>
9 #file(GLOB _tex_tests RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.ltx" "${CMAKE_CURRENT_SOURCE_DIR}/*.tex")
11 #list(REMOVE_ITEM _tex_tests DummyDocument.tex)
13 set(_tex_tests test.ltx
14 box-color-size-space-align.tex
19 test-refstyle-theorems.tex
25 foreach(_fl ${_tex_tests})
27 add_test(NAME tex2lyx/roundtrip/${_fl}
28 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
29 COMMAND ${CMAKE_COMMAND}
30 -DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR}
31 -DLYX_USERDIR_VER=${LYX_USERDIR_VER}
32 -DLYX_PYTHON_EXECUTABLE=${LYX_PYTHON_EXECUTABLE}
33 -DPY_SCRIPT=${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py
34 -DTEX2LYX_EXE=$<TARGET_FILE:${_tex2lyx}>
35 -DSCRIPT_DIR=${TOP_SRC_DIR}/lib/scripts
36 -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}
38 -P ${TOP_SRC_DIR}/src/tex2lyx/test/runtests.cmake)
39 set_tests_properties(tex2lyx/roundtrip/${_fl} PROPERTIES RESOURCE_LOCK "runtests.lock" LABELS "roundtrip")
40 add_test(NAME tex2lyx/cmplyx/${_fl}
41 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
42 COMMAND ${CMAKE_COMMAND}
43 -DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR}
44 -DLYX_USERDIR_VER=${LYX_USERDIR_VER}
45 -DLYX_PYTHON_EXECUTABLE=${LYX_PYTHON_EXECUTABLE}
46 -DPY_SCRIPT=${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py
47 -DFIRST_PARAM=uselyx2lyx
48 -DTEX2LYX_EXE=$<TARGET_FILE:${_tex2lyx}>
49 -DSCRIPT_DIR=${TOP_SRC_DIR}/lib/scripts
50 -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}
52 -P ${TOP_SRC_DIR}/src/tex2lyx/test/runtests.cmake)
53 set_tests_properties(tex2lyx/cmplyx/${_fl} PROPERTIES RESOURCE_LOCK "runtests.lock" LABELS "cmplyx")
56 add_dependencies(lyx_run_tests ${_tex2lyx} ${_lyx})