Skip to content

Commit edd7d88

Browse files
author
rubytester
committed
tests for standalone debug with makefile entry
1 parent 28b45dd commit edd7d88

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ test:
9595
./test.sh
9696
./sa-test.sh
9797
./test.sh debug
98+
./sa-test.sh debug
9899

99100
.PHONY: \
100101
all \

sa-test.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
#!/usr/bin/env bash
22

3+
DEBUG=''
4+
5+
if [ -n "$1" ] && [ $1 == 'debug' ]; then
6+
DEBUG='-debug'
7+
fi
8+
39
echo Building test container image
410
docker build -t selenium/test:local ./Test
511

612
function test_standalone {
713
BROWSER=$1
8-
echo Starting $BROWSER standalone container
14+
echo Starting Selenium standalone-$BROWSER$DEBUG container
915

10-
SA=$(docker run -d selenium/standalone-$BROWSER:2.45.0)
16+
SA=$(docker run -d selenium/standalone-$BROWSER$DEBUG:2.45.0)
1117
SA_NAME=$(docker inspect -f '{{ .Name }}' $SA | sed s:/::)
1218
TEST_CMD="node smoke-$BROWSER.js"
1319

@@ -22,13 +28,13 @@ function test_standalone {
2228
fi
2329

2430
if [ ! "$CIRCLECI" == "true" ]; then
25-
echo Tearing down Selenium $BROWSER standalone container
31+
echo Tearing down Selenium standalone-$BROWSER$DEBUG container
2632
docker stop $SA_NAME
2733
docker rm $SA_NAME
2834
echo Removing the test container
2935
docker rm $TEST_CONTAINER
3036
fi
3137
}
3238

33-
test_standalone firefox
34-
test_standalone chrome
39+
test_standalone firefox $DEBUG
40+
test_standalone chrome $DEBUG

0 commit comments

Comments
 (0)