File tree 9 files changed +16
-104
lines changed
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
211
211
docker push $(NAME ) /standalone-chrome-debug:$(MAJOR_MINOR_PATCH )
212
212
docker push $(NAME ) /standalone-firefox-debug:$(MAJOR_MINOR_PATCH )
213
213
214
- test : test_shell_functions \
215
- test_chrome \
214
+ test : test_chrome \
216
215
test_firefox \
217
216
test_chrome_debug \
218
217
test_firefox_debug \
@@ -222,9 +221,6 @@ test: test_shell_functions \
222
221
test_firefox_standalone_debug
223
222
224
223
225
- test_shell_functions :
226
- ./tests/test-shell-functions.sh
227
-
228
224
test_chrome :
229
225
VERSION=$(VERSION ) NAMESPACE=$(NAMESPACE ) ./tests/bootstrap.sh NodeChrome
230
226
Original file line number Diff line number Diff line change @@ -72,17 +72,14 @@ USER seluser
72
72
#==============================
73
73
# Scripts to run Selenium Node
74
74
#==============================
75
- COPY entry_point.sh \
76
- functions.sh \
77
- /opt/bin/
75
+ COPY entry_point.sh /opt/bin/
78
76
79
77
#============================
80
78
# Some configuration options
81
79
#============================
82
80
ENV SCREEN_WIDTH 1360
83
81
ENV SCREEN_HEIGHT 1020
84
82
ENV SCREEN_DEPTH 24
85
- ENV DISPLAY :99.0
86
83
87
84
#========================
88
85
# Selenium Configuration
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- source /opt/bin/functions.sh
4
3
/opt/bin/generate_config > /opt/selenium/config.json
5
4
6
5
export GEOMETRY=" $SCREEN_WIDTH " " x" " $SCREEN_HEIGHT " " x" " $SCREEN_DEPTH "
@@ -42,11 +41,9 @@ if [ ! -z "$SE_OPTS" ]; then
42
41
echo " appending selenium options: ${SE_OPTS} "
43
42
fi
44
43
45
- SERVERNUM=$( get_server_num)
46
-
47
44
rm -f /tmp/.X* lock
48
45
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" \
50
47
java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
51
48
-role node \
52
49
-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 2
2
#
3
3
# IMPORTANT: Change this file only in directory NodeDebug!
4
4
5
- source /opt/bin/functions.sh
6
5
/opt/bin/generate_config > /opt/selenium/config.json
7
6
8
7
export GEOMETRY=" $SCREEN_WIDTH " " x" " $SCREEN_HEIGHT " " x" " $SCREEN_DEPTH "
@@ -51,12 +50,9 @@ if [ ! -z "$SE_OPTS" ]; then
51
50
echo " appending selenium options: ${SE_OPTS} "
52
51
fi
53
52
54
- SERVERNUM=$( get_server_num)
55
-
56
53
rm -f /tmp/.X* lock
57
54
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" \
60
56
java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
61
57
-role node \
62
58
-hub http://$HUB_PORT_4444_TCP_ADDR :$HUB_PORT_4444_TCP_PORT /grid/register \
@@ -68,6 +64,11 @@ NODE_PID=$!
68
64
trap shutdown SIGTERM SIGINT
69
65
for i in $( seq 1 10)
70
66
do
67
+ DISPLAY=$( xvfb-run printenv DISPLAY)
68
+ if [ -z " $DISPLAY " ]; then
69
+ echo " \$ DISPLAY env variable is empty"
70
+ break
71
+ fi
71
72
xdpyinfo -display $DISPLAY > /dev/null 2>&1
72
73
if [ $? -eq 0 ]; then
73
74
break
Original file line number Diff line number Diff line change 2
2
#
3
3
# IMPORTANT: Change this file only in directory Standalone!
4
4
5
- source /opt/bin/functions.sh
6
-
7
5
export GEOMETRY=" $SCREEN_WIDTH " " x" " $SCREEN_HEIGHT " " x" " $SCREEN_DEPTH "
8
6
9
7
function shutdown {
@@ -15,11 +13,9 @@ if [ ! -z "$SE_OPTS" ]; then
15
13
echo " appending selenium options: ${SE_OPTS} "
16
14
fi
17
15
18
- SERVERNUM=$( get_server_num)
19
-
20
16
rm -f /tmp/.X* lock
21
17
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" \
23
19
java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
24
20
${SE_OPTS} &
25
21
NODE_PID=$!
Original file line number Diff line number Diff line change 2
2
#
3
3
# IMPORTANT: Change this file only in directory StandaloneDebug!
4
4
5
- source /opt/bin/functions.sh
6
-
7
5
export GEOMETRY=" $SCREEN_WIDTH " " x" " $SCREEN_HEIGHT " " x" " $SCREEN_DEPTH "
8
6
9
7
function shutdown {
24
22
25
23
rm -f /tmp/.X* lock
26
24
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" \
31
26
java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
32
27
${SE_OPTS} &
33
28
NODE_PID=$!
34
29
35
30
trap shutdown SIGTERM SIGINT
36
31
for i in $( seq 1 10)
37
32
do
33
+ DISPLAY=$( xvfb-run printenv DISPLAY)
34
+ if [ -z " $DISPLAY " ]; then
35
+ echo " \$ DISPLAY env variable is empty"
36
+ break
37
+ fi
38
38
xdpyinfo -display $DISPLAY > /dev/null 2>&1
39
39
if [ $? -eq 0 ]; then
40
40
break
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments