Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 32 lines (25 sloc) 496 Bytes
#!/bin/sh
set -eu
# check selenium.local is up & availble
func() {
url=selenium.local:4444
if curl --output /dev/null --silent --head --fail "$url"; then
echo 0
else
echo 1
fi
}
# try 10 times to check selenium.local is up.
for i in `seq 1 10 `
do
if [ `func` -eq 0 ]; then
php artisan dusk
./vendor/bin/phpunit
exit 0
else
echo 'selenium is down... wait for boot'
sleep 10
fi
done
echo '[timeout] test runner. could not execute dusk test.'
exit 1