File tree 4 files changed +33
-20
lines changed
4 files changed +33
-20
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ ENV SCREEN_WIDTH 1360
89
89
ENV SCREEN_HEIGHT 1020
90
90
ENV SCREEN_DEPTH 24
91
91
ENV DISPLAY :99.0
92
+ ENV START_XVFB true
92
93
93
94
#========================
94
95
# Selenium Configuration
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- export GEOMETRY=" ${SCREEN_WIDTH} " " x" " ${SCREEN_HEIGHT} " " x" " ${SCREEN_DEPTH} "
3
+ if [ " ${START_XVFB} " = true ] ; then
4
+ export GEOMETRY=" ${SCREEN_WIDTH} " " x" " ${SCREEN_HEIGHT} " " x" " ${SCREEN_DEPTH} "
4
5
5
- rm -f /tmp/.X* lock
6
+ rm -f /tmp/.X* lock
6
7
7
- /usr/bin/Xvfb ${DISPLAY} -screen 0 ${GEOMETRY} -ac +extension RANDR
8
+ /usr/bin/Xvfb ${DISPLAY} -screen 0 ${GEOMETRY} -ac +extension RANDR
9
+ else
10
+ echo " Xvfb won't start. Chrome/Firefox can only run in headless mode. Remember to set the 'headless' flag in your test."
11
+ fi
Original file line number Diff line number Diff line change 2
2
#
3
3
# IMPORTANT: Change this file only in directory NodeDebug!
4
4
5
- fluxbox -display ${DISPLAY}
5
+ if [ " ${START_XVFB} " = true ] ; then
6
+ fluxbox -display ${DISPLAY}
7
+ else
8
+ echo " Fluxbox won't start because Xvfb is configured to not start."
9
+ fi
Original file line number Diff line number Diff line change 2
2
#
3
3
# IMPORTANT: Change this file only in directory NodeDebug!
4
4
5
- if [ ! -z $VNC_NO_PASSWORD ]; then
6
- echo " Starting VNC server without password authentication"
7
- X11VNC_OPTS=
8
- else
9
- X11VNC_OPTS=-usepw
10
- fi
11
-
12
- for i in $( seq 1 10)
13
- do
14
- sleep 1
15
- xdpyinfo -display ${DISPLAY} > /dev/null 2>&1
16
- if [ $? -eq 0 ]; then
17
- break
5
+ if [ " ${START_XVFB} " = true ] ; then
6
+ if [ ! -z $VNC_NO_PASSWORD ]; then
7
+ echo " Starting VNC server without password authentication"
8
+ X11VNC_OPTS=
9
+ else
10
+ X11VNC_OPTS=-usepw
18
11
fi
19
- echo " Waiting for Xvfb..."
20
- done
21
12
22
- x11vnc ${X11VNC_OPTS} -forever -shared -rfbport 5900 -display ${DISPLAY}
13
+ for i in $( seq 1 10)
14
+ do
15
+ sleep 1
16
+ xdpyinfo -display ${DISPLAY} > /dev/null 2>&1
17
+ if [ $? -eq 0 ]; then
18
+ break
19
+ fi
20
+ echo " Waiting for Xvfb..."
21
+ done
22
+
23
+ x11vnc ${X11VNC_OPTS} -forever -shared -rfbport 5900 -display ${DISPLAY}
24
+ else
25
+ echo " Vnc won't start because Xvfb is configured to not start."
26
+ fi
You can’t perform that action at this time.
0 commit comments