mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
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)
This commit is contained in:
parent
742ba333bf
commit
f2937e676a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user