The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit 4182205ca840f8abe2e34f6f4cd57caa51af44fe
Author: Kornel Benko <[email protected]>
Date:   Wed Dec 12 18:23:25 2012 +0100

    Cmake build: autotests
    Make the export test available to all, since it is independent of X11

diff --git a/development/autotests/CMakeLists.txt 
b/development/autotests/CMakeLists.txt
index 3a85964..7bdd2ef 100644
--- a/development/autotests/CMakeLists.txt
+++ b/development/autotests/CMakeLists.txt
@@ -4,9 +4,16 @@
 # Copyright (c) 2012 Kornel Benko [email protected]
 #
 
-if(UNIX)
+if(Q_WS_X11)
+  # Make sure, the needed programs are in PATH
+  find_program(PCREGREP_EXE "pcregrep")
+  find_program(WMCTRL_EXE "wmctrl")
+  # This is needed to build xvkbd
+  # Programs pcregrep wmctrl and xvkbd are used in subsequent scripts
+  # while testing
   find_package(X11)
-  if(X11_FOUND)
+  if(X11_FOUND AND PCREGREP_EXE AND WMCTRL_EXE)
+    message(STATUS "PCREGREP_EXE and WMCTRL_EXE found")
     project(autotests)
 
     add_subdirectory(xvkbd)
@@ -36,9 +43,9 @@ if(UNIX)
         -DLOCALE_DIR=${LOCALE_DIR}
         -P ${TOP_SRC_DIR}/development/autotests/single-test.cmake)
     endforeach()
-    add_test(NAME lyx_export
-      WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
-      COMMAND ${CMAKE_COMMAND} -DLYX_ROOT=${TOP_SRC_DIR} 
-Dlyx=${TOP_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/lyx -P 
"${TOP_SRC_DIR}/development/autotests/export.cmake")
-    set_tests_properties(lyx_export PROPERTIES DEPENDS lyx)
   endif()
 endif()
+add_test(NAME lyx_export
+  WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${LYX_HOME}"
+  COMMAND ${CMAKE_COMMAND} -DLYX_ROOT=${TOP_SRC_DIR} 
-Dlyx=${TOP_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/lyx -P 
"${TOP_SRC_DIR}/development/autotests/export.cmake")
+set_tests_properties(lyx_export PROPERTIES DEPENDS lyx)
diff --git a/development/autotests/export.cmake 
b/development/autotests/export.cmake
index b848cb4..6693e09 100755
--- a/development/autotests/export.cmake
+++ b/development/autotests/export.cmake
@@ -1,4 +1,17 @@
-
+# This file is part of LyX, the document processor.
+# Licence details can be found in the file COPYING.
+#
+# Copyright (c) 2012 Kornel Benko [email protected]
+#
+#
+# LYX_ROOT  = ${TOP_SRC_DIR}
+# lyx       = ${TOP_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/lyx
+#
+# Script should be called like:
+# cmake -DLYX_ROOT=xxx \
+#       -Dlyx=xxx \
+#       -P "${TOP_SRC_DIR}/development/autotests/export.cmake"
+#
 file(GLOB lyx_files "${LYX_ROOT}/lib/doc/*.lyx")
 message(STATUS "lyx_files = ${lyx_files}")
 

-----------------------------------------------------------------------

Summary of changes:
 development/autotests/CMakeLists.txt |   19 +++++++++++++------
 development/autotests/export.cmake   |   15 ++++++++++++++-
 2 files changed, 27 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to