Commit 652e0a4d authored by Niels Möller's avatar Niels Möller

* src/testsuite/x11-2-test: Use lsh, not lshg, for this test. Also

export DISPLAY.

* src/testsuite/x11-1-test: export DISPLAY.
* src/testsuite/x11-5-test: Likewise.

* src/testsuite/x11-5-test: Use $XMODMAP.

Rev: src/testsuite/x11-1-test:1.5
Rev: src/testsuite/x11-2-test:1.6
Rev: src/testsuite/x11-5-test:1.4
parent 1b4e5874
......@@ -13,7 +13,11 @@ check_x11_support
# For this test, it doesn't matter at all if we have an X-server listening
# FIXME: lshd should require the --x11-forward option
LSH_FLAGS="$LSH_FLAGS --x11"
DISPLAY=:47
spawn_lshd && exec_lsh 'test -n "$DISPLAY"' && test_success
spawn_lshd && \
(DISPLAY=:47
export DISPLAY
exec_lsh 'test -n "$DISPLAY"') \
&& test_success
test_done
......@@ -10,16 +10,17 @@ fi
need_xvfb
DISPLAY=$TEST_DISPLAY
export DISPLAY
# Passing variables to an invocation of a shell function seems
# somewhat flaky, hence the sub-process.
# somewhat flaky, so we use separate commands for setting all
# variables. The sub-process prevents LSHG_FLAGS to leak to the next
# command.
spawn_xvfb \
&& spawn_lshd \
&& spawn_lsh --start-gateway \
&& (LSHG_FLAGS="$LSHG_FLAGS --x11"; exec_lshg xmodmap > /dev/null) \
&& if exec_lshg xmodmap > /dev/null ; then false ; else true; fi \
&& (DISPLAY=$TEST_DISPLAY;
export DISPLAY;
LSH_FLAGS="$LSH_FLAGS --x11";
exec_lsh "$XMODMAP" > /dev/null) \
&& if exec_lsh "$XMODMAP" > /dev/null; then false ; else true; fi \
&& test_success
test_done
......@@ -10,13 +10,19 @@ fi
need_xvfb
# FIXME: The command DISPLAY= ... is run in a subshell, because
# otherwise, LSHG_FLAGS leaks to the next command (GNU bash
# 3.1.17(1)-release). I don't understand why.
set -x
# Passing variables to an invocation of a shell function seems
# somewhat flaky, so we use separate commands for setting all
# variables. The sub-process prevents LSHG_FLAGS to leak to the next
# command.
spawn_xvfb \
&& spawn_lshd \
&& spawn_lsh --start-gateway \
&& ( DISPLAY=$TEST_DISPLAY LSHG_FLAGS="$LSHG_FLAGS --x11" exec_lshg $XMODMAP > /dev/null ) \
&& (DISPLAY=$TEST_DISPLAY;
export DISPLAY;
LSHG_FLAGS="$LSHG_FLAGS --x11";
exec_lshg $XMODMAP > /dev/null ) \
&& if exec_lshg $XMODMAP > /dev/null ; then false ; else test_success; fi
test_done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment