]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
support different ports for different browsers
authorHolger Levsen <holger@layer-acht.org>
Wed, 4 Apr 2012 17:29:25 +0000 (19:29 +0200)
committerHolger Levsen <holger@layer-acht.org>
Wed, 4 Apr 2012 17:29:25 +0000 (19:29 +0200)
schedule_selenium_tests.sh

index 9bf7ffecbefdc0ac6db96a47febf768d7c97351b..a8add207d1f48bd790df85e9933e93fd37fa3e9e 100755 (executable)
@@ -3,15 +3,23 @@
 set -e
 export 
 
+TOKEN=$(pwgen)
 TEST_LANGUAGE=$(echo $JOB_NAME | cut -d "-" -f2)
 TEST_BROWSER=$(echo $JOB_NAME | cut -d "-" -f3)
 
 figlet $TEST_LANGUAGE
 figlet $TEST_BROWSER
 
-TOKEN=$(pwgen)
+if [ "$TEST_BROWSER" = "firefox" ] ; then
+       TEST_PORT=4444
+elif [ "$TEST_BROWSER" = "chrome" ] ; then
+       TEST_PORT=4445
+else
+       figlet "unknown browser"
+       exit 1
+fi
 
-ssh -i ~jenkins/.ssh/id_selenium -t selenium@seoul ./runit.sh $TOKEN $TEST_LANGUAGE $TEST_BROWSER
+ssh -i ~jenkins/.ssh/id_selenium -t selenium@seoul ./runit.sh $TOKEN $TEST_LANGUAGE $TEST_BROWSER $TEST_PORT
 scp -r -i ~jenkins/.ssh/id_selenium selenium@seoul:$TOKEN/* .
 ssh -i ~jenkins/.ssh/id_selenium selenium@seoul rm ./$TOKEN -Rf