Skip to content

Commit

Permalink
Merge pull request #459 from diemol/master
Browse files Browse the repository at this point in the history
Fix work with environment variables at `xvfb-run` (2nd time)
  • Loading branch information
ddavison authored Apr 21, 2017
2 parents 69707f0 + d918f6d commit dea597e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion NodeChromeDebug/entry_point.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ rm -f /tmp/.X*lock
env | cut -f 1 -d "=" | sort > asroot
sudo -E -u seluser -i env | cut -f 1 -d "=" | sort > asseluser
sudo -E -i -u seluser \
$(for E in $(grep -vxFf asseluser asroot); do echo $E=$(eval echo \$$E); done) \
"$(for E in $(grep -vxFf asseluser asroot); do echo $E=$(eval echo \$$E); done)" \
DISPLAY=$DISPLAY \
xvfb-run -n $SERVERNUM --server-args="-screen 0 $GEOMETRY -ac +extension RANDR" \
java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
Expand Down
2 changes: 1 addition & 1 deletion NodeFirefoxDebug/entry_point.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ rm -f /tmp/.X*lock
env | cut -f 1 -d "=" | sort > asroot
sudo -E -u seluser -i env | cut -f 1 -d "=" | sort > asseluser
sudo -E -i -u seluser \
$(for E in $(grep -vxFf asseluser asroot); do echo $E=$(eval echo \$$E); done) \
"$(for E in $(grep -vxFf asseluser asroot); do echo $E=$(eval echo \$$E); done)" \
DISPLAY=$DISPLAY \
xvfb-run -n $SERVERNUM --server-args="-screen 0 $GEOMETRY -ac +extension RANDR" \
java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
Expand Down
2 changes: 1 addition & 1 deletion StandaloneDebug/entry_point.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sudo -E -u seluser -i env | cut -f 1 -d "=" | sort > asseluser

# Add root environment variables that are not present in the seluser
# environment to an environment file.
$(for E in $(grep -vxFf asseluser asroot); do echo $E="'${!E}'" >> ~seluser/selenv; done) \
"$(for E in $(grep -vxFf asseluser asroot); do echo $E="'${!E}'" >> ~seluser/selenv; done)" \
echo "DISPLAY=${DISPLAY}" >> ~seluser/selenv

sudo -E -i -u seluser \
Expand Down
2 changes: 1 addition & 1 deletion sa-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function test_standalone {
exit 1
fi

if [ ! "$CIRCLECI" == "true" ]; then
if [ ! "${TRAVIS}" == "true" ]; then
echo Tearing down Selenium standalone-$BROWSER$DEBUG container
docker stop $SA_NAME
docker rm $SA_NAME
Expand Down
4 changes: 2 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function test_node {
exit 1
fi

if [ ! "$CIRCLECI" == "true" ]; then
if [ ! "${TRAVIS}" == "true" ]; then
echo Removing the test container
docker rm $TEST_CONTAINER
fi
Expand All @@ -72,7 +72,7 @@ if [ -z $DEBUG ]; then
test_node phantomjs $DEBUG
fi

if [ ! "$CIRCLECI" == "true" ]; then
if [ ! "${TRAVIS}" == "true" ]; then
echo Tearing down Selenium Chrome Node container
docker stop $NODE_CHROME
docker rm $NODE_CHROME
Expand Down

0 comments on commit dea597e

Please sign in to comment.