test fixing php 7.1 on travis
authorgggeek <giunta.gaetano@gmail.com>
Sat, 1 Jul 2017 15:19:58 +0000 (16:19 +0100)
committergggeek <giunta.gaetano@gmail.com>
Sat, 1 Jul 2017 15:19:58 +0000 (16:19 +0100)
.travis.yml
test/ci/travis/setup_apache.sh
test/ci/travis/setup_apache_hhvm.sh
test/ci/travis/setup_php_fpm.sh

index 9fcb4a6..ca0fb3a 100644 (file)
@@ -24,7 +24,7 @@ install:
 
 before_script:
   # Disable xdebug. NB: this should NOT be done for hhvm...
-  - if [ $TRAVIS_PHP_VERSION != "hhvm" ]; then phpenv config-rm xdebug.ini; fi
+  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-rm xdebug.ini; fi
 
 
   # Set up Apache and Privoxy instances inside the Travis VM and use them for testing against
@@ -33,6 +33,8 @@ before_script:
   - ./test/ci/travis/setup_privoxy.sh
 
 script:
+  # Travis currently compiles PHP with an oldish cURL/GnuTLS combination;
+  # to make the tests pass when Apache has a bogus SSL cert whe need the full set of options below
   php -d "include_path=.:./lib:./test" test/testsuite.php LOCALSERVER=localhost URI=/demo/server/server.php HTTPSSERVER=localhost HTTPSURI=/demo/server/server.php PROXY=localhost:8080 HTTPSVERIFYHOST=0 HTTPSIGNOREPEER=1 SSLVERSION=3
 
 after_failure:
index b9d2465..c6c957a 100755 (executable)
@@ -6,7 +6,7 @@
 sudo a2enmod rewrite actions fastcgi alias ssl
 
 # configure apache virtual hosts
-sudo a2dissite 000-default.conf
+#sudo a2dissite 000-default.conf
 sudo cp -f test/ci/travis/apache_vhost /etc/apache2/sites-available/default
 sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
 sudo service apache2 restart
index 76dbef8..b764915 100755 (executable)
@@ -6,7 +6,7 @@
 sudo a2enmod rewrite actions fastcgi alias ssl
 
 # configure apache virtual hosts
-sudo a2dissite 000-default.conf
+#sudo a2dissite 000-default.conf
 sudo cp -f test/ci/travis/apache_vhost_hhvm /etc/apache2/sites-available/default
 sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
 sudo service apache2 restart
index e9ad9c6..58bdc14 100755 (executable)
@@ -6,10 +6,13 @@ sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.ph
 if [ "$TRAVIS_PHP_VERSION" = "7.0" -a -n "$(ls -A ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d)" ]; then
   sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
 fi
+if [ "$TRAVIS_PHP_VERSION" = "7.1" -a -n "$(ls -A ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d)" ]; then
+  sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf
+fi
 
-# NB: the following does not seem to work with php 5.3...
 echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
 echo "always_populate_raw_post_data = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
+# NB: the following does not seem to work with php 5.3...
 echo "include_path = '.:$(pwd)/lib'" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
 
 ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm