#!/bin/env bash
DBNAME=$1
DBUSER=$2
DBPASS=$3
DBHOST=$4

source ./build_bokeh_config.sh $DBNAME $DBUSER $DBPASS $DBHOST
php -d display_errors=on -d error_reporting=E_ALL scripts/upgrade_db.php

phpunit -c tests/phpunit_eco.xml --list-suites \
    && phpunit -c tests/phpunit_eco.xml \
    && phpunit -c tests_db/phpunit.xml --list-suites \
    && phpunit -c tests_db/phpunit.xml --exclude-group no-ci \
    && phpunit -c tests/phpunit_js.xml --list-suites \
    && phpunit -c tests/phpunit_js.xml --exclude-group no-ci \
    && phpunit -c tests/phpunit_templates.xml --list-suites \
    && phpunit -c tests/phpunit_templates.xml --exclude-group no-ci \
    && phpunit -c cosmogramme/tests/phpunit.xml --list-suites \
    && phpunit -c cosmogramme/tests/phpunit.xml --exclude-group no-ci \
    && cd cosmogramme/cosmozend/tests \
    && phpunit --list-suites \
    && phpunit --exclude-group no-ci