X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=development%2Fautotests%2FCMakeLists.txt;h=485e9767eee2aa6ecf2dcaf95cb1321bd23677b1;hb=d1a41a9bdc8da0ee402ecffc89079bcc92e6cf36;hp=4ea5c7017243d3d33c7ddf2807bbd6355bd1596f;hpb=78b7045ed8b245332b99a4a92c9d1eef6517d2f6;p=lyx.git diff --git a/development/autotests/CMakeLists.txt b/development/autotests/CMakeLists.txt index 4ea5c70172..485e9767ee 100644 --- a/development/autotests/CMakeLists.txt +++ b/development/autotests/CMakeLists.txt @@ -67,18 +67,30 @@ if(QT_USES_X11) message(STATUS "cmake build is therefore omitting keytests") endif() - if(NOT Missing) + if(Missing OR NOT LYX_ENABLE_KEYTESTS) + set(_runtest FALSE) + else() project(keytest) add_subdirectory(xvkbd) + set(_runtest TRUE) set(KEYTEST "${CMAKE_CURRENT_SOURCE_DIR}/keytest.py") file(GLOB TESTST RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*-in.txt") file(GLOB TESTSS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*-in.sh") - list(REMOVE_ITEM TESTST hello-world-in.txt first-time-in.txt) + set(_firsttxt first-time-in.txt hello-world-in.txt) + foreach(_f ${_firsttxt}) + list(FIND TESTST ${_f} _ff) + if(NOT _ff GREATER -1) + set(_runtest FALSE) + break() + endif() + endforeach() + list(REMOVE_ITEM TESTST ${_firsttxt}) list(SORT TESTST) - - foreach(_tf first-time-in.txt hello-world-in.txt ${TESTST}) + endif() + if(_runtest) + foreach(_tf ${_firsttxt} ${TESTST}) string(REGEX REPLACE "-in\\.(txt|sh)" "" _t ${_tf}) add_test(NAME keytest/${_t} WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}" @@ -93,6 +105,7 @@ if(QT_USES_X11) -DLYX_USERDIR_VER=${LYX_USERDIR_VER} -DKEYTEST_OUTFILE=${_t}-out.txt -DPACKAGE=${PACKAGE} + -DFRONTEND=${LYX_USE_QT} -DLOCALE_DIR=${LOCALE_DIR} -P ${TOP_SRC_DIR}/development/autotests/single-test.cmake) settestlabel(keytest/${_t} "key")