Created
July 31, 2017 13:43
-
-
Save ianmjones/c1f9819d5707324b18701aef3755074c 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
#!/usr/bin/env bash | |
cd `dirname $0` | |
source ./.env | |
while getopts "u:p:h:d:ct:z:s:vkge:" ARG | |
do | |
case ${ARG} in | |
e) TEST_ENV=$OPTARG;; | |
esac | |
done | |
TEST_ENV=${TEST_ENV-""} | |
RUN_WITH="" | |
RUN_CHROME=`echo "${TEST_ENV}" | sed 's/chrome//'` | |
if [ "${TEST_ENV}" != "${RUN_CHROME}" ] | |
then | |
RUN_WITH="${RUN_WITH}-chrome " | |
fi | |
RUN_FIREFOX=`echo "${TEST_ENV}" | sed 's/firefox//'` | |
if [ "${TEST_ENV}" != "${RUN_FIREFOX}" ] | |
then | |
RUN_WITH="${RUN_WITH}-firefox " | |
fi | |
RUN_PHANTOMJS=`echo "${TEST_ENV}" | sed 's/phantomjs//'` | |
if [ "${TEST_ENV}" != "${RUN_PHANTOMJS}" ] | |
then | |
RUN_WITH="${RUN_WITH}-phantomjs " | |
fi | |
for BROWSER in "${RUN_WITH}" | |
do | |
docker-compose run --rm acceptance-tests${BROWSER} $@ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment