endif()
endmacro()
-# This labels should not be used in .*Tests files
-set(known_labels "export" "key" "layout" "load" "lyx2lyx"
- "examples" "manuals" "mathmacros" "reverted" "templates" "unreliable" "suspended"
- "module" "roundtrip" "url")
-
-macro(loadTestList filename resList)
+macro(loadTestList filename resList depth)
# Create list of strings from a file without comments
# ENCODING parameter is a new feature in cmake 3.1
if (CMAKE_VERSION VERSION_GREATER "3.1")
if (_ff GREATER -1)
message(STATUS "Label \"${_l}\" already in use. Reused in ${filename}")
else()
- list(APPEND known_labels ${_l})
+ assignLabelDepth(${depth} ${_l})
endif()
endforeach()
foreach(_lg ${languages})
endforeach()
endmacro()
-loadTestList(suspiciousTests suspiciousTests)
-loadTestList(ignoredTests ignoredTests)
-loadTestList(suspendedTests suspendedTests)
-loadTestList(unreliableTests unreliableTests)
+# This labels should not be used in .*Tests files
+set(known_labels "")
+# Create depth info to each label
+macro(assignLabelDepth depth)
+ foreach(_lab ${ARGN})
+ list(APPEND known_labels ${_lab})
+ set(depth_${_lab} ${depth})
+ endforeach()
+endmacro()
+
+assignLabelDepth(0 "export" "key" "layout" "load" "lyx2lyx" "module" "roundtrip" "url")
+assignLabelDepth(1 "unreliable" "reverted")
+assignLabelDepth(2 "suspended")
+assignLabelDepth(3 "examples" "manuals" "mathmacros" "templates" "autotests")
+
+loadTestList(suspiciousTests suspiciousTests 7)
+loadTestList(ignoredTests ignoredTests 0)
+loadTestList(suspendedTests suspendedTests 6)
+loadTestList(unreliableTests unreliableTests 5)
# preparing to add e.g. development/mathmacros to the foreach() loop
foreach(libsubfolderx autotests/export lib/doc lib/examples lib/templates development/mathmacros)
-DTOP_SRC_DIR=${TOP_SRC_DIR}
-DPERL_EXECUTABLE=${PERL_EXECUTABLE}
-P "${TOP_SRC_DIR}/development/autotests/export.cmake")
- setmarkedtestlabel(${TestName} ${reverted} ${mytestlabel})
+ setmarkedtestlabel(${TestName} ${mytestlabel})
endif()
if(LYX_PYTHON_EXECUTABLE)
set(lyx2lyxtestlabel "lyx2lyx")
"-DLYX_TESTS_USERDIR=${LYX_TESTS_USERDIR}"
"-DLYXFILE=${LIBSUB_SRC_DIR}/${f}.lyx"
-P "${TOP_SRC_DIR}/development/autotests/lyx2lyxtest.cmake")
- setmarkedtestlabel(${TestName} ${reverted} ${mytestlabel})
+ setmarkedtestlabel(${TestName} ${mytestlabel})
endif()
endif()
set(loadtestlabel "load")
-DPARAMS_DIR=${TOP_SRC_DIR}/development/autotests
-DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}
-P "${TOP_SRC_DIR}/development/autotests/check_load.cmake")
- setmarkedtestlabel(${TestName} ${reverted} ${mytestlabel})
+ setmarkedtestlabel(${TestName} ${mytestlabel})
set_tests_properties(${TestName} PROPERTIES RUN_SERIAL ON)
endif()
getoutputformats("${LIBSUB_SRC_DIR}/${f}.lyx" formatlist)
-DTOP_SRC_DIR=${TOP_SRC_DIR}
-DPERL_EXECUTABLE=${PERL_EXECUTABLE}
-P "${TOP_SRC_DIR}/development/autotests/export.cmake")
- setmarkedtestlabel(${TestName} ${reverted} ${mytestlabel}) # check for suspended pdf/dvi exports
+ setmarkedtestlabel(${TestName} ${mytestlabel}) # check for suspended pdf/dvi exports
endif()
endforeach()
endforeach()
set_tests_properties(${testname} PROPERTIES LABELS "${_lab_list}")
endmacro()
-macro(setmarkedtestlabel testname reverted)
- settestlabel(${testname} ${ARGN})
+macro(sortlabellist listout)
+ set(tmplist "")
+ foreach(_lab ${ARGN})
+ list(APPEND tmplist "${depth_${_lab}}${_lab}")
+ endforeach()
+ list(SORT tmplist)
+ string(REGEX REPLACE "[0-9]+" "" ${listout} "${tmplist}")
endmacro()
+macro(createlabel reslabel first)
+ set(${reslabel} ${first})
+ foreach(_lab ${ARGN})
+ set(${reslabel} "${${reslabel}}:${_lab}")
+ endforeach()
+endmacro()
+
+macro(setmarkedtestlabel testname)
+ sortlabellist(mynewlablelist ${ARGN})
+ createlabel(mynewlabel ${mynewlablelist})
+ settestlabel(${testname} ${mynewlabel})
+endmacro()
macro(lyx_target_link_libraries _target)
foreach(_lib ${ARGN})