-
-
Save garbas/4742213 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export REMOTE_URL="http://XXXX:[email protected]:80/wd/hub" | |
export ZSERVER_HOST="0.0.0.0" | |
DESIRED_CAPABILITIES=$(cat <<EOF | python - | |
import os | |
SELENIUM_DRIVER = os.environ.get('SELENIUM_DRIVER') | |
DESIRED_CAPABILITIES = '' | |
for item in SELENIUM_DRIVER.split('?', 1)[1].split('&') | |
DESIRED_CAPABILITIES += ',' | |
item = item.replace('=', ':') | |
item = item.replace('os:', 'platform:') | |
item = item.replace('browser-version:', 'version:') | |
DESIRED_CAPABILITIES = DESIRED_CAPABILITIES[1:] | |
JOB_NAME = os.environ.get('JOB_NAME').replace('jenkins-', '').replace('/SELENIUM_DRIVER=', ' | ') | |
BULD_NUMBER = os.environ.get('BUILD_NUMBER') | |
DESIRED_CAPABILITIES += ',name:' + JOB_NAME + ' | #' + BULD_NUMBER | |
print DESIRED_CAPABILITIES | |
EOF) | |
export DESIRED_CAPABILITIES | |
BROWSER=$(echo $SELENIUM_DRIVER | perl -pe 's|.*browser=(.*?)&.*|\1|') | |
export BROWSER | |
$PYTHON27 bootstrap.py | |
bin/buildout | |
bin/test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment