commit f2937e676ac4f52e7d4c0bb0c3b24f0cc341ee2f
Author: Kornel Benko <[email protected]>
Date:   Mon Aug 25 13:45:32 2014 +0200

    Fix stalling of keytests when invalid DISPLAY
    
    Before, the keytests would run infinitely if the
    tests were run, e.g. through SSH without X forwarding.
    To reproduce that problem, run
    
      DISPLAY='' ctest -R hello
    
    This commit causes the test to correctly fail in such situations.
    (Collaboration with Scott Kostyshak)

diff --git a/development/autotests/single-test.cmake 
b/development/autotests/single-test.cmake
index e42c6e0..f76bb21 100755
--- a/development/autotests/single-test.cmake
+++ b/development/autotests/single-test.cmake
@@ -48,6 +48,12 @@ else()
   set(LYX_WINDOW_NAME "")
 endif()
 
+#check for plausible DISPLAY environment (needed bei keytests)
+set(DISPLAY_VAR $ENV{DISPLAY})
+if(NOT DISPLAY_VAR MATCHES "^[a-zA-Z\\.]*:[0-9]+\(\\.[0-9]+\)?$")
+  message(FATAL_ERROR "Invalid DISPLAY environment value (== 
'${DISPLAY_VAR}')")
+endif()
+
 set(LYX_EXE "${BINDIR}/${LYX}")
 set(use_hacked $ENV{XVKBD_HACKED})
 if(NOT use_hacked)

Reply via email to