Skip to content
Snippets Groups Projects
Commit 20935f4e authored by Vincent Petry's avatar Vincent Petry
Browse files

Catch setup errors during autotest

parent 49f0f9f2
No related branches found
No related tags found
No related merge requests found
...@@ -185,19 +185,23 @@ EOF ...@@ -185,19 +185,23 @@ EOF
cp $BASEDIR/tests/autoconfig-$1.php $BASEDIR/config/autoconfig.php cp $BASEDIR/tests/autoconfig-$1.php $BASEDIR/config/autoconfig.php
# trigger installation # trigger installation
php -f index.php echo "INDEX"
php -f index.php | grep -i -C9999 error && echo "Error during setup" && exit 101
echo "END INDEX"
#test execution #test execution
echo "Testing with $1 ..." echo "Testing with $1 ..."
cd tests cd tests
rm -rf coverage-html-$1 rm -rf coverage-html-$1
mkdir coverage-html-$1 mkdir coverage-html-$1
php -f enable_all.php php -f enable_all.php | grep -i -C9999 error && echo "Error during setup" && exit 101
if [ -z "$NOCOVERAGE" ]; then if [ -z "$NOCOVERAGE" ]; then
$PHPUNIT --configuration phpunit-autotest.xml --log-junit autotest-results-$1.xml --coverage-clover autotest-clover-$1.xml --coverage-html coverage-html-$1 $2 $3 $PHPUNIT --configuration phpunit-autotest.xml --log-junit autotest-results-$1.xml --coverage-clover autotest-clover-$1.xml --coverage-html coverage-html-$1 $2 $3
RESULT=$?
else else
echo "No coverage" echo "No coverage"
$PHPUNIT --configuration phpunit-autotest.xml --log-junit autotest-results-$1.xml $2 $3 $PHPUNIT --configuration phpunit-autotest.xml --log-junit autotest-results-$1.xml $2 $3
RESULT=$?
fi fi
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment