2
2
3
3
NOCOVERAGE=" -ncc"
4
4
COVERAGE=" --nccfc CommonTreeDropdown CommonDropdown CommonDBTM CommonGLPI CommonDBConnexity CommonDBRelation"
5
+ COMPOSER=` which composer`
5
6
6
7
# init databases
7
8
init_databases () {
@@ -17,13 +18,16 @@ init_databases() {
17
18
18
19
# GLPI install
19
20
install_glpi () {
21
+ if [ " $GLPI_BRANCH " = ' 9.4/bugfixes' ]; then
22
+ echo " Downgrading to composer 1"
23
+ sudo wget https://getcomposer.org/composer-1.phar -O " $COMPOSER "
24
+ fi
20
25
echo Installing GLPI
21
26
sudo rm -rf ../glpi
22
27
git clone --depth=35 $GLPI_SOURCE -b $GLPI_BRANCH ../glpi && cd ../glpi
23
28
composer install --no-dev --no-interaction
24
- if [ -e bin/console ]; then php bin/console dependencies install; fi
25
- if [ -e bin/console ]; then php bin/console glpi:system:check_requirements; fi
26
- if [ ! -e bin/console ]; then composer install --no-dev; fi
29
+ php bin/console dependencies install
30
+ php bin/console glpi:system:check_requirements
27
31
mkdir -p tests/files/_cache
28
32
cp -r ../formcreator plugins/$PLUGINNAME
29
33
}
@@ -43,9 +47,7 @@ init_glpi() {
43
47
rm ../../$TEST_GLPI_CONFIG_DIR /config_db.php || true
44
48
echo Installing GLPI on database $1
45
49
mkdir -p ../../$TEST_GLPI_CONFIG_DIR
46
- if [ -e ../../tools/cliinstall.php ] ; then php ./tests/install_glpi.php --host $DB_HOST --db=$1 --user=$2 --pass=$3 ; fi
47
- if [ -e ../../scripts/cliinstall.php ] ; then php ./tests/install_glpi.php --host $DB_HOST --db=$1 --user=$2 --pass=$3 ; fi
48
- if [ -e ../../bin/console ]; then php ../../bin/console glpi:database:install --db-host=$DB_HOST --db-user=$2 --db-password=$3 --db-name=$1 --config-dir=../../$TEST_GLPI_CONFIG_DIR --no-interaction --no-plugins --force; fi
50
+ php ../../bin/console glpi:database:install --db-host=$DB_HOST --db-user=$2 --db-password=$3 --db-name=$1 --config-dir=../../$TEST_GLPI_CONFIG_DIR --no-interaction --no-plugins --force
49
51
}
50
52
51
53
# Plugin upgrade test
0 commit comments