Skip to content
Snippets Groups Projects
build.sh 1.45 KiB
Newer Older
llaffont's avatar
llaffont committed
#!/bin/bash
Laurent's avatar
Laurent committed
DBNAME=$1
DBUSER=$2
DBPASS=$3
source ./update.sh
cp config.ini.default config.ini
sed -i "s/sgbd.config.host = localhost/sgbd.config.host = $DBHOST/g" config.ini
Laurent's avatar
Laurent committed
sed -i "s/sgbd.config.username =/sgbd.config.username = $DBUSER/g" config.ini
sed -i "s/sgbd.config.password =/sgbd.config.password = $DBPASS/g" config.ini
sed -i "s/sgbd.config.dbname =/sgbd.config.dbname = $DBNAME/g" config.ini
touch local.php
php -d display_errors=on -d error_reporting=E_ALL scripts/upgrade_db.php

cd cosmogramme
cp config.ref.php config.php
sed -i "s/integration_server=localhost/integration_server=$DBHOST/g" config.php
Laurent's avatar
Laurent committed
sed -i "s/integration_user=root/integration_user=$DBUSER/g" config.php
sed -i "s/integration_pwd=root/integration_pwd=$DBPASS/g" config.php
sed -i "s/integration_base=opac3/integration_base=$DBNAME/g" config.php
Laurent's avatar
Laurent committed
export OPENSSL_CONF=/etc/ssl/

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