diff options
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 31 |
1 files changed, 30 insertions, 1 deletions
@@ -358,6 +358,16 @@ use_php_zts() { ln -sfn "/usr/local/php-${VERSION}-zts/bin/phpize" $PHPIZE } +use_php_bc() { + VERSION=$1 + PHP=`which php` + PHP_CONFIG=`which php-config` + PHPIZE=`which phpize` + ln -sfn "/usr/local/php-${VERSION}-bc/bin/php" $PHP + ln -sfn "/usr/local/php-${VERSION}-bc/bin/php-config" $PHP_CONFIG + ln -sfn "/usr/local/php-${VERSION}-bc/bin/phpize" $PHPIZE +} + build_php5.5() { use_php 5.5 rm -rf vendor @@ -376,6 +386,19 @@ build_php5.5_zts_c() { cd php/tests && /bin/bash ./test.sh && cd ../.. } +build_php5.5_32() { + use_php_bc 5.5 + rm -rf vendor + cp -r /usr/local/vendor-5.5 vendor + ./vendor/bin/phpunit +} + +build_php5.5_c_32() { + use_php_bc 5.5 + wget https://phar.phpunit.de/phpunit-old.phar -O /usr/bin/phpunit + cd php/tests && /bin/bash ./test.sh && cd ../.. +} + build_php5.6() { use_php 5.6 rm -rf vendor @@ -391,7 +414,8 @@ build_php5.6_c() { build_php5.6_mac() { # Install PHP curl -s https://php-osx.liip.ch/install.sh | bash -s 5.6 - export PATH="/usr/local/php5-5.6.25-20160831-101628/bin:$PATH" + PHP_FOLDER=`find /usr/local -type d -name "php5-5.6*"` # The folder name may change upon time + export PATH="$PHP_FOLDER/bin:$PATH" # Install phpunit curl https://phar.phpunit.de/phpunit.phar -L -o phpunit.phar @@ -429,6 +453,11 @@ build_php_all() { build_php5.5_zts_c } +build_php_all_32() { + build_php5.5_32 + build_php5.5_c_32 +} + # Note: travis currently does not support testing more than one language so the # .travis.yml cheats and claims to only be cpp. If they add multiple language # support, this should probably get updated to install steps and/or |