aboutsummaryrefslogtreecommitdiff
path: root/tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh29
1 files changed, 28 insertions, 1 deletions
diff --git a/tests.sh b/tests.sh
index ab6d1d61..d067f4ad 100755
--- a/tests.sh
+++ b/tests.sh
@@ -337,7 +337,9 @@ build_jruby() {
build_ruby_all() {
build_ruby21
build_ruby22
- build_jruby
+ # TODO(teboring): Disable jruby test temperarily for it randomly fails.
+ # https://grpc-testing.appspot.com/job/protobuf_pull_request/735/consoleFull.
+ # build_jruby
}
build_javascript() {
@@ -345,6 +347,19 @@ build_javascript() {
cd js && npm install && npm test && cd ..
}
+generate_php_test_proto() {
+ internal_build_cpp
+ pushd php/tests
+ # 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
+ pushd ../../src
+ ./protoc --php_out=../php/tests/generated google/protobuf/empty.proto
+ popd
+ popd
+}
+
use_php() {
VERSION=$1
PHP=`which php`
@@ -356,6 +371,7 @@ use_php() {
cp "/usr/bin/php$VERSION" $PHP
cp "/usr/bin/php-config$VERSION" $PHP_CONFIG
cp "/usr/bin/phpize$VERSION" $PHPIZE
+ generate_php_test_proto
}
use_php_zts() {
@@ -366,6 +382,7 @@ use_php_zts() {
ln -sfn "/usr/local/php-${VERSION}-zts/bin/php" $PHP
ln -sfn "/usr/local/php-${VERSION}-zts/bin/php-config" $PHP_CONFIG
ln -sfn "/usr/local/php-${VERSION}-zts/bin/phpize" $PHPIZE
+ generate_php_test_proto
}
use_php_bc() {
@@ -376,13 +393,16 @@ use_php_bc() {
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
+ generate_php_test_proto
}
build_php5.5() {
use_php 5.5
+ pushd php
rm -rf vendor
cp -r /usr/local/vendor-5.5 vendor
./vendor/bin/phpunit
+ popd
}
build_php5.5_c() {
@@ -398,9 +418,11 @@ build_php5.5_zts_c() {
build_php5.5_32() {
use_php_bc 5.5
+ pushd php
rm -rf vendor
cp -r /usr/local/vendor-5.5 vendor
./vendor/bin/phpunit
+ popd
}
build_php5.5_c_32() {
@@ -411,9 +433,11 @@ build_php5.5_c_32() {
build_php5.6() {
use_php 5.6
+ pushd php
rm -rf vendor
cp -r /usr/local/vendor-5.6 vendor
./vendor/bin/phpunit
+ popd
}
build_php5.6_c() {
@@ -422,6 +446,7 @@ build_php5.6_c() {
}
build_php5.6_mac() {
+ generate_php_test_proto
# Install PHP
curl -s https://php-osx.liip.ch/install.sh | bash -s 5.6
PHP_FOLDER=`find /usr/local -type d -name "php5-5.6*"` # The folder name may change upon time
@@ -443,9 +468,11 @@ build_php5.6_mac() {
build_php7.0() {
use_php 7.0
+ pushd php
rm -rf vendor
cp -r /usr/local/vendor-7.0 vendor
./vendor/bin/phpunit
+ popd
}
build_php7.0_c() {