Skip to content

Commit c2d9987

Browse files
committed
ci: drop old GLPI support
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent 16f1e57 commit c2d9987

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tests/script-functions.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
NOCOVERAGE="-ncc"
44
COVERAGE="--nccfc CommonTreeDropdown CommonDropdown CommonDBTM CommonGLPI CommonDBConnexity CommonDBRelation"
5+
COMPOSER=`which composer`
56

67
# init databases
78
init_databases() {
@@ -17,13 +18,16 @@ init_databases() {
1718

1819
# GLPI install
1920
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
2025
echo Installing GLPI
2126
sudo rm -rf ../glpi
2227
git clone --depth=35 $GLPI_SOURCE -b $GLPI_BRANCH ../glpi && cd ../glpi
2328
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
2731
mkdir -p tests/files/_cache
2832
cp -r ../formcreator plugins/$PLUGINNAME
2933
}
@@ -43,9 +47,7 @@ init_glpi() {
4347
rm ../../$TEST_GLPI_CONFIG_DIR/config_db.php || true
4448
echo Installing GLPI on database $1
4549
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
4951
}
5052

5153
# Plugin upgrade test

0 commit comments

Comments
 (0)