From 5b2f483fa5bc9094460355903b1d92fc473d730b Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Thu, 2 Oct 2014 21:47:01 -0400 Subject: [PATCH] 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. --- .travis.yml | 4 +--- tests/travis.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 tests/travis.sh diff --git a/.travis.yml b/.travis.yml index 5ca38a0..9d1530f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/tests/travis.sh b/tests/travis.sh new file mode 100644 index 0000000..25bd5d9 --- /dev/null +++ b/tests/travis.sh @@ -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