Skip to content

Commit

Permalink
Merge pull request #67 from SeleniumHQ/fix_issue_49
Browse files Browse the repository at this point in the history
test.sh sanity script fails to run Firefox tests
  • Loading branch information
rubytester committed Jun 9, 2015
2 parents 52233f0 + c774c2a commit 78d60bd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM node:0.10-onbuild
MAINTAINER Selenium <selenium-developers@googlegroups.com>

ENV TEST_CMD node smoke-chrome.js && node smoke-firefox.js
ENV TEST_CMD ""
# The remainder of this build will be completed by the upstream image's ONBUILD commands
34 changes: 22 additions & 12 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,28 @@ docker logs -f $NODE_CHROME &
docker logs -f $NODE_FIREFOX &
sleep 2

echo Running test container...
docker run -it --link $HUB_NAME:hub selenium/test:local
STATUS=$?
TEST_CONTAINER=$(docker ps -aq | head -1)

if [ ! $STATUS == 0 ]; then
echo Failed
exit 1
fi
function test_node {
BROWSER=$1
echo Running $BROWSER test...
TEST_CMD="node smoke-$BROWSER.js"
docker run -it --link $HUB_NAME:hub -e TEST_CMD="$TEST_CMD" selenium/test:local
STATUS=$?
TEST_CONTAINER=$(docker ps -aq | head -1)

if [ ! $STATUS == 0 ]; then
echo Failed
exit 1
fi

if [ ! "$CIRCLECI" == "true" ]; then
echo Removing the test container
docker rm $TEST_CONTAINER
fi

}

test_node chrome $DEBUG
test_node firefox $DEBUG

if [ ! "$CIRCLECI" == "true" ]; then
echo Tearing down Selenium Chrome Node container
Expand All @@ -43,9 +56,6 @@ if [ ! "$CIRCLECI" == "true" ]; then
echo Tearing down Selenium Hub container
docker stop $HUB
docker rm $HUB

echo Removing the test container
docker rm $TEST_CONTAINER
fi

echo Done

0 comments on commit 78d60bd

Please sign in to comment.