]> git.lyx.org Git - features.git/commitdiff
Export tests in cmake build: Do not use the default userdir while
authorKornel Benko <kornel@lyx.org>
Tue, 23 Jul 2013 19:42:44 +0000 (21:42 +0200)
committerKornel Benko <kornel@lyx.org>
Tue, 23 Jul 2013 19:42:44 +0000 (21:42 +0200)
running lyx.

development/autotests/CMakeLists.txt
development/autotests/export.cmake

index c5fd05d2e362f8383fbe1866937d291d905e3f2f..1dba37a32c110056e8966fb39293af0a1eb2e5a2 100644 (file)
@@ -59,7 +59,7 @@ if(Q_WS_X11)
   endif()
 
   if(Missing)
-    message(STATUS "Missing libraries or programs to create xvkbd: ${Missing}")
+    message(STATUS "Missing Libraries or programms to create xvkbd: ${Missing}")
     message(STATUS "cmake build is therefore omiting autotests")
   endif()
 
@@ -81,14 +81,14 @@ if(Q_WS_X11)
     foreach(_tf first-time-in.txt hello-world-in.txt ${TESTST})
       string(REGEX REPLACE "-in\\.(txt|sh)" "" _t ${_tf})
       add_test(NAME autotests/${_t}
-       WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
-       COMMAND ${CMAKE_COMMAND}
+        WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
+        COMMAND ${CMAKE_COMMAND}
         -DAUTOTEST_ROOT=${TOP_SRC_DIR}/development/autotests
         -DPO_BUILD_DIR=${TOP_BINARY_DIR}/po
         -DKEYTEST_INFILE=${_tf}
         -DBINDIR=$<TARGET_FILE_DIR:${_lyx}>
-       -DLYX=${_lyx}
-       -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}
+        -DLYX=${_lyx}
+        -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}
         -DKEYTEST_OUTFILE=${_t}-out.txt
         -DPACKAGE=${PACKAGE}
         -DLOCALE_DIR=${LOCALE_DIR}
@@ -137,6 +137,7 @@ foreach(libsubfolder doc examples templates)
       WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
       COMMAND ${CMAKE_COMMAND} -DLYX_ROOT=${LIBSUB_SRC_DIR}
           -Dlyx=$<TARGET_FILE:${_lyx}>
+          -DWORKDIR=${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}
           -Dformat=lyx16x
           -Dextension=16.lyx
           -Dfile=${f}
@@ -155,4 +156,3 @@ foreach(libsubfolder doc examples templates)
   endforeach()
 endforeach()
 
-
index 9db019142788ad366130061bdd556e3896c6c6c8..75ef3d645b3a745eafc68abb8a83dd1a3196b53e 100755 (executable)
@@ -4,7 +4,7 @@
 # Copyright (c) 2012 Kornel Benko kornel@lyx.org
 #
 #
-# LYX_ROOT  = ${TOP_SRC_DIR}/lib/doc
+# LYX_ROOT  = ${TOP_SRC_DIR}/lib/{doc,examples,templates}
 # lyx       = 
 # format    = lyx16x|xhtml
 # extension = 16.lyx|xhtml
@@ -12,6 +12,7 @@
 #
 # Script should be called like:
 # cmake -DLYX_ROOT=xxx \
+#       -DWORKDIR=${BUILD_DIR}/autotests/out-home
 #       -Dlyx=xxx \
 #       -Dformat=xxx \
 #       -Dextension=xxx \
@@ -20,6 +21,7 @@
 #
 
 message(STATUS "Executing ${lyx} -E ${format} ${file}.${extension} ${LYX_ROOT}/${file}.lyx")
+set(ENV{LYX_USERDIR} "${WORKDIR}/.lyx")
 execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${file}.${extension})
 execute_process(
   COMMAND ${lyx} -E ${format} ${file}.${extension} "${LYX_ROOT}/${file}.lyx"