Added script to set up extension

As per https://github.com/travis-ci/travis-ci/issues/2523 it appears that the
php.ini on hhvm is in a different place. Created a script to write the
extensions to the right php.ini based on the environment.
This commit is contained in:
Josh Sherman 2014-10-02 21:47:01 -04:00
parent 31f4c32fb0
commit 5b2f483fa5
2 changed files with 15 additions and 3 deletions

View file

@ -29,9 +29,7 @@ install:
- composer install
before_script:
- echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- ./tests/travis.sh
- mysql -e "create database IF NOT EXISTS test;" -u root
- mysql test < tests/schema.sql -u root
- mkdir -p build/logs

14
tests/travis.sh Normal file
View file

@ -0,0 +1,14 @@
#!/bin/sh
VERSION=`phpenv version-name`
if [ "$VERSION" -eq "hhvm" ]
then
PHPINI=/etc/hhvm/php.ini
else
PHPINI="~/.phpenv/versions/$VERSION/etc/php.ini"
fi
echo "extension = memcache.so" >> $PHPINI
echo "extension = memcached.so" >> $PHPINI
echo "extension = redis.so" >> $PHPINI