From 817156a26fe0e8f279d815f786a4f54ee9bcb754 Mon Sep 17 00:00:00 2001 From: Michele Locati Date: Tue, 11 Dec 2018 15:48:50 +0100 Subject: [PATCH] Remove not passing extensions, test fewer extensions, fix installed extensions check --- data/supported-extensions | 36 +++++++++++++-------------- scripts/check-installed-extension.php | 21 ++++++++++++++++ scripts/travisci-test-new-extensions | 2 +- 3 files changed, 40 insertions(+), 19 deletions(-) create mode 100644 scripts/check-installed-extension.php diff --git a/data/supported-extensions b/data/supported-extensions index f91e60e..0d8836b 100644 --- a/data/supported-extensions +++ b/data/supported-extensions @@ -1,4 +1,4 @@ -amqp 7.0 7.1 7.2 7.3 +amqp 7.0 7.1 7.2 apcu 7.0 7.1 7.2 7.3 bcmath 5.6 7.0 7.1 7.2 7.3 bz2 5.6 7.0 7.1 7.2 7.3 @@ -15,9 +15,9 @@ imap 5.6 7.0 7.1 7.2 7.3 interbase 5.6 7.0 7.1 7.2 7.3 intl 5.6 7.0 7.1 7.2 7.3 ldap 5.6 7.0 7.1 7.2 7.3 -mcrypt 5.6 7.0 7.1 7.2 7.3 +mcrypt 5.6 7.0 7.1 7.2 memcache 5.6 -memcached 5.6 7.0 7.1 7.2 7.3 +memcached 5.6 7.0 7.1 7.2 mysql 5.6 mysqli 5.6 7.0 7.1 7.2 7.3 odbc 5.6 7.0 7.1 7.2 7.3 @@ -28,7 +28,7 @@ pdo_firebird 5.6 7.0 7.1 7.2 7.3 pdo_mysql 5.6 7.0 7.1 7.2 7.3 pdo_odbc 5.6 7.0 7.1 7.2 7.3 pdo_pgsql 5.6 7.0 7.1 7.2 7.3 -pdo_sqlsrv 7.0 7.1 7.2 7.3 +pdo_sqlsrv 7.0 7.1 7.2 pgsql 5.6 7.0 7.1 7.2 7.3 pspell 5.6 7.0 7.1 7.2 7.3 pthreads 5.6 7.0 @@ -39,18 +39,18 @@ snmp 5.6 7.0 7.1 7.2 7.3 soap 5.6 7.0 7.1 7.2 7.3 sockets 5.6 7.0 7.1 7.2 7.3 solr 5.6 7.0 7.1 -sqlsrv 7.0 7.1 7.2 7.3 -ssh2 5.6 7.0 7.1 7.2 7.3 +sqlsrv 7.0 7.1 7.2 +ssh2 5.6 7.0 7.1 7.2 sybase_ct 5.6 -sysvmsg 5.6 7.0 7.1 7.2 7.3 -sysvsem 5.6 7.0 7.1 7.2 7.3 -sysvshm 5.6 7.0 7.1 7.2 7.3 -tidy 5.6 7.0 7.1 7.2 7.3 -timezonedb 5.6 7.0 7.1 7.2 7.3 -uuid 5.6 7.0 7.1 7.2 7.3 -wddx 5.6 7.0 7.1 7.2 7.3 -xdebug 5.6 7.0 7.1 7.2 7.3 -xmlrpc 5.6 7.0 7.1 7.2 7.3 -xsl 5.6 7.0 7.1 7.2 7.3 -yaml 5.6 7.0 7.1 7.2 7.3 -zip 5.6 7.0 7.1 7.2 7.3 +sysvmsg 5.6 7.0 7.1 7.2 +sysvsem 5.6 7.0 7.1 7.2 +sysvshm 5.6 7.0 7.1 7.2 +tidy 5.6 7.0 7.1 7.2 +timezonedb 5.6 7.0 7.1 7.2 +uuid 5.6 7.0 7.1 7.2 +wddx 5.6 7.0 7.1 7.2 +xdebug 5.6 7.0 7.1 7.2 +xmlrpc 5.6 7.0 7.1 7.2 +xsl 5.6 7.0 7.1 7.2 +yaml 5.6 7.0 7.1 7.2 +zip 5.6 7.0 7.1 7.2 diff --git a/scripts/check-installed-extension.php b/scripts/check-installed-extension.php new file mode 100644 index 0000000..bc1b921 --- /dev/null +++ b/scripts/check-installed-extension.php @@ -0,0 +1,21 @@ + 'Zend OPcache', +); +$extensionLowerCase = strtolower($extension); +if (isset($nameMap[$extensionLowerCase])) { + $extension = $nameMap[$extensionLowerCase]; +} + +if (extension_loaded($extension)) { + exit(0); +} +fprintf(STDERR, sprintf("Extension not loaded: %s\n", $extension)); +exit(1); diff --git a/scripts/travisci-test-new-extensions b/scripts/travisci-test-new-extensions index b215d81..2feb19f 100755 --- a/scripts/travisci-test-new-extensions +++ b/scripts/travisci-test-new-extensions @@ -56,7 +56,7 @@ testExtension () { testExtension_Image="$(getExtensionImage "${1}" "${2}")" printf ' - Docker image: %s\n' "${testExtension_Image}" testExtension_out=`mktemp` - if $(docker run --rm --volume "${TRAVIS_BUILD_DIR}:/app" --workdir /app "${testExtension_Image}" bash -c "./install-php-extensions ${1} && php -r "'"'"exit(extension_loaded('${1}') ? 0 : 1);"'"'"" >"${testExtension_out}" 2>&1); then + if $(docker run --rm --volume "${TRAVIS_BUILD_DIR}:/app" --workdir /app "${testExtension_Image}" bash -c "./install-php-extensions '${1}' && php ./scripts/check-installed-extension.php '${1}'" >"${testExtension_out}" 2>&1); then rm -rf "${testExtension_out}" printf ' - Passed\n' return 0