Created
March 10, 2016 06:51
-
-
Save bradjones1/782ec8283d963a2b5511 to your computer and use it in GitHub Desktop.
Drupal 8 unit test script
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 | |
# see https://github.com/docker/compose/issues/374#issuecomment-174506025 | |
set -e | |
echoerr() { echo "$@" 1>&2; } | |
echoerr wait-for-port: waiting for port 80 to open | |
((TIMEOUT=60*15)) | |
timeout $TIMEOUT bash <<EOT | |
while ! (echo > /dev/tcp/localhost/80) >/dev/null 2>&1; | |
do sleep 1; | |
done; | |
EOT | |
RESULT=$? | |
if [ $RESULT -eq 0 ]; then | |
sleep 1 | |
echoerr wait-for-port: done | |
else | |
echoerr wait-for-port: timeout waiting for webserver to start. | |
fi | |
export SIMPLETEST_DB=sqlite://localhost//dev/shm/sqlite.ci | |
cd ~www-data/html/web/core | |
../../vendor/bin/phpunit --filter '/^((?!simpletest\\Functional).)*$/' --colors=never | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment