]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/test/CMakeLists.txt
2b1115221ef7022a0d4c171eab2fd80c0a8606d3
[lyx.git] / src / tex2lyx / test / CMakeLists.txt
1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
3 #
4 # Copyright (c) 2012 Kornel Benko, <kornel@lyx.org>
5 #
6
7 project(test)
8
9 #file(GLOB _tex_tests RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.ltx" "${CMAKE_CURRENT_SOURCE_DIR}/*.tex")
10 #
11 #list(REMOVE_ITEM _tex_tests DummyDocument.tex)
12
13 set(_tex_tests test.ltx
14                box-color-size-space-align.tex
15                CJK.tex
16                CJKutf8.tex
17                test-insets.tex
18                test-modules.tex
19                test-refstyle-theorems.tex
20                test-structure.tex
21                verbatim.tex
22                XeTeX-polyglossia.tex)
23
24 foreach(_fl ${_tex_tests})
25   set(fl ${_fl})
26   add_test(NAME tex2lyx/roundtrip/${_fl}
27     WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
28     COMMAND ${CMAKE_COMMAND}
29       -DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR}
30       -DLYX_USERDIR_VER=${LYX_USERDIR_VER}
31       -DLYX_PYTHON_EXECUTABLE=${LYX_PYTHON_EXECUTABLE}
32       -DPY_SCRIPT=${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py
33       -DTEX2LYX_EXE=$<TARGET_FILE:${_tex2lyx}>
34       -DSCRIPT_DIR=${TOP_SRC_DIR}/lib/scripts
35       -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}
36       -DTESTFILE=${fl}
37       -P ${TOP_SRC_DIR}/src/tex2lyx/test/runtests.cmake)
38   set_tests_properties(tex2lyx/roundtrip/${_fl} PROPERTIES RESOURCE_LOCK "runtests.lock" LABELS "roundtrip")
39   add_test(NAME tex2lyx/cmplyx/${_fl}
40     WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
41     COMMAND ${CMAKE_COMMAND}
42       -DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR}
43       -DLYX_USERDIR_VER=${LYX_USERDIR_VER}
44       -DLYX_PYTHON_EXECUTABLE=${LYX_PYTHON_EXECUTABLE}
45       -DPY_SCRIPT=${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py
46       -DFIRST_PARAM=uselyx2lyx
47       -DTEX2LYX_EXE=$<TARGET_FILE:${_tex2lyx}>
48       -DSCRIPT_DIR=${TOP_SRC_DIR}/lib/scripts
49       -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}
50       -DTESTFILE=${fl}
51       -P ${TOP_SRC_DIR}/src/tex2lyx/test/runtests.cmake)
52   set_tests_properties(tex2lyx/cmplyx/${_fl} PROPERTIES RESOURCE_LOCK "runtests.lock" LABELS "cmplyx")
53 endforeach()
54
55 add_dependencies(lyx_run_tests ${_tex2lyx} ${_lyx})
56