[TOOLS] Allow specifying a list of filters when running tests with make. When running make test foobar only the test foobar is executed (read the documentation for phpunit --filter)

This commit is contained in:
2021-10-28 17:24:43 +01:00
parent a55d60d880
commit 8238980395
2 changed files with 15 additions and 2 deletions

View File

@@ -2,6 +2,14 @@
cd /var/www/social || exit 1
printf "Cleaning Redis cache: " && echo "FLUSHALL" | nc redis 6379
yes yes | php bin/console doctrine:fixtures:load || exit 1
runuser -u www-data -- vendor/bin/simple-phpunit -vvv --coverage-html .test_coverage_report
echo yooo
if [ "$#" -eq 0 ]; then
runuser -u www-data -- vendor/bin/simple-phpunit -vvv --coverage-html .test_coverage_report
else
echo "Running with filter"
runuser -u www-data -- vendor/bin/simple-phpunit -vvv --coverage-html .test_coverage_report --filter "$*"
fi