]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/test/CMakeLists.txt
Parse post command argument insets (bug #8473)
[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-memoir.tex
19                test-modules.tex
20                test-refstyle-theorems.tex
21                test-scr.tex
22                test-structure.tex
23                verbatim.tex
24                XeTeX-polyglossia.tex
25                algo2e.tex)
26
27 foreach(_fl ${_tex_tests})
28   set(fl ${_fl})
29   add_test(NAME tex2lyx/roundtrip/${_fl}
30     WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
31     COMMAND ${CMAKE_COMMAND}
32       -DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR}
33       -DLYX_USERDIR_VER=${LYX_USERDIR_VER}
34       -DLYX_PYTHON_EXECUTABLE=${LYX_PYTHON_EXECUTABLE}
35       -DPY_SCRIPT=${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py
36       -DTEX2LYX_EXE=$<TARGET_FILE:${_tex2lyx}>
37       -DSCRIPT_DIR=${TOP_SRC_DIR}/lib/scripts
38       -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}
39       -DTESTFILE=${fl}
40       -P ${TOP_SRC_DIR}/src/tex2lyx/test/runtests.cmake)
41   set_tests_properties(tex2lyx/roundtrip/${_fl} PROPERTIES RESOURCE_LOCK "runtests.lock" LABELS "roundtrip")
42   add_test(NAME tex2lyx/cmplyx/${_fl}
43     WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
44     COMMAND ${CMAKE_COMMAND}
45       -DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR}
46       -DLYX_USERDIR_VER=${LYX_USERDIR_VER}
47       -DLYX_PYTHON_EXECUTABLE=${LYX_PYTHON_EXECUTABLE}
48       -DPY_SCRIPT=${TOP_SRC_DIR}/src/tex2lyx/test/runtests.py
49       -DFIRST_PARAM=uselyx2lyx
50       -DTEX2LYX_EXE=$<TARGET_FILE:${_tex2lyx}>
51       -DSCRIPT_DIR=${TOP_SRC_DIR}/lib/scripts
52       -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}
53       -DTESTFILE=${fl}
54       -P ${TOP_SRC_DIR}/src/tex2lyx/test/runtests.cmake)
55   set_tests_properties(tex2lyx/cmplyx/${_fl} PROPERTIES RESOURCE_LOCK "runtests.lock" LABELS "cmplyx")
56 endforeach()
57
58 add_dependencies(lyx_run_tests ${_tex2lyx} ${_lyx})
59