Skip to content

Instantly share code, notes, and snippets.

@neclimdul
Created May 11, 2015 20:40
Show Gist options
  • Save neclimdul/faa64c9e11e144bdf1b8 to your computer and use it in GitHub Desktop.
Save neclimdul/faa64c9e11e144bdf1b8 to your computer and use it in GitHub Desktop.
core_tests.sh
#!/bin/bash
WEB=`pgrep nginx | wc -l`
if [ $WEB -eq 0 ]; then
WEB=`pgrep apache | wc -l`
if [ $WEB -eq 0 ]; then
echo "start your damn web server"
exit
fi
fi
PHP=`which php`
OPTIONS="--url http://localhost.local/d8 --concurrency 8 --color"
OPTIONS="$OPTIONS --die-on-fail"
# OPTIONS="$OPTIONS --verbose"
OPTIONS="$OPTIONS --dburl mysql://root:[email protected]:3306/d_d8"
OPTIONS="$OPTIONS --sqlite ./test.sqlite"
TESTS="
Drupal\system\Tests\Ajax\DialogTest
Drupal\rest\Tests\ReadTest
Drupal\rest\Tests\ResourceTest
"
sudo find sites/default/files/simpletest/verbose/ -delete
LIST=""
for test in $TESTS; do
LIST="$LIST,$test"
done
sudo -u www-data $PHP core/scripts/run-tests.sh --clean
sudo -u www-data $PHP core/scripts/run-tests.sh $OPTIONS --class ${LIST:1}
#sudo -u www-data $PHP core/scripts/run-tests.sh $OPTIONS --all
#sudo -u www-data $PHP core/scripts/run-tests.sh $OPTIONS page_cache
#sudo -u www-data $PHP core/scripts/run-tests.sh $OPTIONS Cache
sudo php5enmod -s fpm xdebug
pgrep php5-fpm > /dev/null && sudo service php5-fpm restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment