aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh21
1 files changed, 18 insertions, 3 deletions
diff --git a/tests.sh b/tests.sh
index a89f6dfc..68ba7cc7 100755
--- a/tests.sh
+++ b/tests.sh
@@ -359,7 +359,7 @@ generate_php_test_proto() {
# Generate test file
rm -rf generated
mkdir generated
- ../../src/protoc --php_out=generated proto/test.proto proto/test_include.proto proto/test_no_namespace.proto
+ ../../src/protoc --php_out=generated proto/test.proto proto/test_include.proto proto/test_no_namespace.proto proto/test_prefix.proto
pushd ../../src
./protoc --php_out=../php/tests/generated google/protobuf/empty.proto
popd
@@ -403,7 +403,14 @@ use_php_bc() {
}
build_php5.5() {
- use_php 5.5
+ PHP=`which php`
+ PHP_CONFIG=`which php-config`
+ PHPIZE=`which phpize`
+ ln -sfn "/usr/local/php-5.5/bin/php" $PHP
+ ln -sfn "/usr/local/php-5.5/bin/php-config" $PHP_CONFIG
+ ln -sfn "/usr/local/php-5.5/bin/phpize" $PHPIZE
+ generate_php_test_proto
+
pushd php
rm -rf vendor
cp -r /usr/local/vendor-5.5 vendor
@@ -416,7 +423,15 @@ build_php5.5() {
}
build_php5.5_c() {
- use_php 5.5
+ PHP=`which php`
+ PHP_CONFIG=`which php-config`
+ PHPIZE=`which phpize`
+ ln -sfn "/usr/local/php-5.5/bin/php" $PHP
+ ln -sfn "/usr/local/php-5.5/bin/php-config" $PHP_CONFIG
+ ln -sfn "/usr/local/php-5.5/bin/phpize" $PHPIZE
+ generate_php_test_proto
+ wget https://phar.phpunit.de/phpunit-old.phar -O /usr/bin/phpunit
+
cd php/tests && /bin/bash ./test.sh && cd ../..
pushd conformance
make test_php_c