]> source.dussan.org Git - nextcloud-server.git/commitdiff
Catch setup errors during autotest
authorVincent Petry <pvince81@owncloud.com>
Wed, 5 Feb 2014 14:34:08 +0000 (15:34 +0100)
committerVincent Petry <pvince81@owncloud.com>
Wed, 5 Feb 2014 14:34:08 +0000 (15:34 +0100)
autotest.sh

index 94fc692a94dafa400a0da914f62cd02a25e828a9..b88e9cf68b4c74829002e2bc54db7385b9d1c07b 100755 (executable)
@@ -185,19 +185,23 @@ EOF
        cp $BASEDIR/tests/autoconfig-$1.php $BASEDIR/config/autoconfig.php
 
        # 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
        echo "Testing with $1 ..."
        cd tests
        rm -rf 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
                $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
                echo "No coverage"
                $PHPUNIT --configuration phpunit-autotest.xml --log-junit autotest-results-$1.xml $2 $3
+               RESULT=$?
        fi
 }