Skip to content

Commit 0b1e26e

Browse files
committed
try starting xvfb in different manner
1 parent eb04853 commit 0b1e26e

File tree

2 files changed

+25
-18
lines changed

2 files changed

+25
-18
lines changed

.travis.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
group: deprecated-2017Q3
1+
#group: deprecated-2017Q3
22

33
language: cpp
44
os: linux
@@ -11,6 +11,8 @@ env:
1111
- GMOCK_VER=1.8.0
1212
- GMOCK_VER=1.7.0
1313
- GMOCK_PATH=/usr/src/gmock #1.6.0 from ubuntu trusty repo
14+
global:
15+
- DISPLAY=:99
1416
matrix:
1517
include:
1618
- os: linux
@@ -42,6 +44,11 @@ addons:
4244
- qtbase5-dev
4345
- xvfb
4446

47+
before_install:
48+
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x24"
49+
#${DISPLAY}
50+
- sleep 3
51+
4552
install:
4653
- if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then brew update && brew install ninja qt5; fi
4754
- gem install bundler

travis.sh

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@ cmake --build build --target features
3030
# Start virtual X display server
3131

3232
# Starting Xvfb hangs on OSX, that's why we do this on Linux only now
33-
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
34-
DISPLAY=:99
35-
export DISPLAY
36-
37-
# Xvfb sends SIGUSR1 to its parent when it finished startup, this causes the 'wait' below to stop waiting
38-
trap : USR1
39-
(trap '' USR1; Xvfb $DISPLAY -screen 0 640x480x8 -nolisten tcp > /dev/null 2>&1) &
40-
XVFBPID=$!
41-
wait || :
42-
trap '' USR1
43-
if ! kill -0 $XVFBPID 2> /dev/null; then
44-
echo "Xvfb failed to start" >&2
45-
exit 1
46-
fi
47-
else
48-
unset DISPLAY
49-
fi
33+
#if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
34+
# DISPLAY=:99
35+
# export DISPLAY
36+
#
37+
# # Xvfb sends SIGUSR1 to its parent when it finished startup, this causes the 'wait' below to stop waiting
38+
# trap : USR1
39+
# (trap '' USR1; Xvfb $DISPLAY -screen 0 640x480x8 -nolisten tcp > /dev/null 2>&1) &
40+
# XVFBPID=$!
41+
# wait || :
42+
# trap '' USR1
43+
# if ! kill -0 $XVFBPID 2> /dev/null; then
44+
# echo "Xvfb failed to start" >&2
45+
# exit 1
46+
# fi
47+
#else
48+
# unset DISPLAY
49+
#fi
5050

5151
for TEST in \
5252
build/examples/Calc/GTestCalculatorSteps \

0 commit comments

Comments
 (0)