File tree Expand file tree Collapse file tree 9 files changed +16
-104
lines changed Expand file tree Collapse file tree 9 files changed +16
-104
lines changed Original file line number Diff line number Diff line change @@ -211,8 +211,7 @@ release: tag_major_minor
211211 docker push $(NAME ) /standalone-chrome-debug:$(MAJOR_MINOR_PATCH )
212212 docker push $(NAME ) /standalone-firefox-debug:$(MAJOR_MINOR_PATCH )
213213
214- test : test_shell_functions \
215- test_chrome \
214+ test : test_chrome \
216215 test_firefox \
217216 test_chrome_debug \
218217 test_firefox_debug \
@@ -222,9 +221,6 @@ test: test_shell_functions \
222221 test_firefox_standalone_debug
223222
224223
225- test_shell_functions :
226- ./tests/test-shell-functions.sh
227-
228224test_chrome :
229225 VERSION=$(VERSION ) NAMESPACE=$(NAMESPACE ) ./tests/bootstrap.sh NodeChrome
230226
Original file line number Diff line number Diff line change @@ -72,17 +72,14 @@ USER seluser
7272#==============================
7373# Scripts to run Selenium Node
7474#==============================
75- COPY entry_point.sh \
76- functions.sh \
77- /opt/bin/
75+ COPY entry_point.sh /opt/bin/
7876
7977#============================
8078# Some configuration options
8179#============================
8280ENV SCREEN_WIDTH 1360
8381ENV SCREEN_HEIGHT 1020
8482ENV SCREEN_DEPTH 24
85- ENV DISPLAY :99.0
8683
8784#========================
8885# Selenium Configuration
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- source /opt/bin/functions.sh
43/opt/bin/generate_config > /opt/selenium/config.json
54
65export GEOMETRY=" $SCREEN_WIDTH " " x" " $SCREEN_HEIGHT " " x" " $SCREEN_DEPTH "
@@ -42,11 +41,9 @@ if [ ! -z "$SE_OPTS" ]; then
4241 echo " appending selenium options: ${SE_OPTS} "
4342fi
4443
45- SERVERNUM=$( get_server_num)
46-
4744rm -f /tmp/.X* lock
4845
49- xvfb-run -n $SERVERNUM --server-args=" -screen 0 $GEOMETRY -ac +extension RANDR" \
46+ xvfb-run -a --server-args=" -screen 0 $GEOMETRY -ac +extension RANDR" \
5047 java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
5148 -role node \
5249 -hub http://$HUB_PORT_4444_TCP_ADDR :$HUB_PORT_4444_TCP_PORT /grid/register \
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22#
33# IMPORTANT: Change this file only in directory NodeDebug!
44
5- source /opt/bin/functions.sh
65/opt/bin/generate_config > /opt/selenium/config.json
76
87export GEOMETRY=" $SCREEN_WIDTH " " x" " $SCREEN_HEIGHT " " x" " $SCREEN_DEPTH "
@@ -51,12 +50,9 @@ if [ ! -z "$SE_OPTS" ]; then
5150 echo " appending selenium options: ${SE_OPTS} "
5251fi
5352
54- SERVERNUM=$( get_server_num)
55-
5653rm -f /tmp/.X* lock
5754
58- DISPLAY=$DISPLAY \
59- xvfb-run -n $SERVERNUM --server-args=" -screen 0 $GEOMETRY -ac +extension RANDR" \
55+ xvfb-run -a --server-args=" -screen 0 $GEOMETRY -ac +extension RANDR" \
6056 java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
6157 -role node \
6258 -hub http://$HUB_PORT_4444_TCP_ADDR :$HUB_PORT_4444_TCP_PORT /grid/register \
@@ -68,6 +64,11 @@ NODE_PID=$!
6864trap shutdown SIGTERM SIGINT
6965for i in $( seq 1 10)
7066do
67+ DISPLAY=$( xvfb-run printenv DISPLAY)
68+ if [ -z " $DISPLAY " ]; then
69+ echo " \$ DISPLAY env variable is empty"
70+ break
71+ fi
7172 xdpyinfo -display $DISPLAY > /dev/null 2>&1
7273 if [ $? -eq 0 ]; then
7374 break
Original file line number Diff line number Diff line change 22#
33# IMPORTANT: Change this file only in directory Standalone!
44
5- source /opt/bin/functions.sh
6-
75export GEOMETRY=" $SCREEN_WIDTH " " x" " $SCREEN_HEIGHT " " x" " $SCREEN_DEPTH "
86
97function shutdown {
@@ -15,11 +13,9 @@ if [ ! -z "$SE_OPTS" ]; then
1513 echo " appending selenium options: ${SE_OPTS} "
1614fi
1715
18- SERVERNUM=$( get_server_num)
19-
2016rm -f /tmp/.X* lock
2117
22- xvfb-run -n $SERVERNUM --server-args=" -screen 0 $GEOMETRY -ac +extension RANDR" \
18+ xvfb-run -a --server-args=" -screen 0 $GEOMETRY -ac +extension RANDR" \
2319 java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
2420 ${SE_OPTS} &
2521NODE_PID=$!
Original file line number Diff line number Diff line change 22#
33# IMPORTANT: Change this file only in directory StandaloneDebug!
44
5- source /opt/bin/functions.sh
6-
75export GEOMETRY=" $SCREEN_WIDTH " " x" " $SCREEN_HEIGHT " " x" " $SCREEN_DEPTH "
86
97function shutdown {
2422
2523rm -f /tmp/.X* lock
2624
27- SERVERNUM=$( get_server_num)
28-
29- DISPLAY=$DISPLAY \
30- xvfb-run -n $SERVERNUM --server-args=" -screen 0 $GEOMETRY -ac +extension RANDR" \
25+ xvfb-run -a --server-args=" -screen 0 $GEOMETRY -ac +extension RANDR" \
3126 java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
3227 ${SE_OPTS} &
3328NODE_PID=$!
3429
3530trap shutdown SIGTERM SIGINT
3631for i in $( seq 1 10)
3732do
33+ DISPLAY=$( xvfb-run printenv DISPLAY)
34+ if [ -z " $DISPLAY " ]; then
35+ echo " \$ DISPLAY env variable is empty"
36+ break
37+ fi
3838 xdpyinfo -display $DISPLAY > /dev/null 2>&1
3939 if [ $? -eq 0 ]; then
4040 break
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments