aboutsummaryrefslogtreecommitdiff
path: root/tests.sh
diff options
context:
space:
mode:
authorPaul Yang <TeBoring@users.noreply.github.com>2016-10-25 17:27:05 -0700
committerGitHub <noreply@github.com>2016-10-25 17:27:05 -0700
commit51c5ff889ccd3836c25f40baafb350f92c9ee103 (patch)
tree39ba93f36167e2ab73c25ac337da0a97a4df4970 /tests.sh
parent58580da37357941d502805be3ae520441be77728 (diff)
downloadprotobuf-51c5ff889ccd3836c25f40baafb350f92c9ee103.tar.gz
protobuf-51c5ff889ccd3836c25f40baafb350f92c9ee103.tar.bz2
protobuf-51c5ff889ccd3836c25f40baafb350f92c9ee103.zip
Fix pure php implementation for 32-bit machine. (#2282)
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests.sh b/tests.sh
index fb7044f3..1335c06b 100755
--- a/tests.sh
+++ b/tests.sh
@@ -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,13 @@ 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.6() {
use_php 5.6
rm -rf vendor
@@ -429,6 +446,10 @@ build_php_all() {
build_php5.5_zts_c
}
+build_php_all_32() {
+ build_php5.5_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