aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh29
1 files changed, 18 insertions, 11 deletions
diff --git a/tests.sh b/tests.sh
index 76286fc9..da607281 100755
--- a/tests.sh
+++ b/tests.sh
@@ -27,6 +27,9 @@ internal_build_cpp() {
export CXX="g++-4.8" CC="gcc-4.8"
fi
+ # Initialize any submodules.
+ git submodule update --init --recursive
+
./autogen.sh
./configure CXXFLAGS="-fPIC" # -fPIC is needed for python cpp test.
# See python/setup.py for more details
@@ -35,7 +38,7 @@ internal_build_cpp() {
build_cpp() {
internal_build_cpp
- make check -j2
+ make check -j2 || (cat src/test-suite.log; false)
cd conformance && make test_cpp && cd ..
# The benchmark code depends on cmake, so test if it is installed before
@@ -53,6 +56,8 @@ build_cpp() {
}
build_cpp_distcheck() {
+ # Initialize any submodules.
+ git submodule update --init --recursive
./autogen.sh
./configure
make dist
@@ -102,7 +107,7 @@ build_csharp() {
# Check that the protos haven't broken C# codegen.
# TODO(jonskeet): Fail if regenerating creates any changes.
csharp/generate_protos.sh
-
+
csharp/buildall.sh
cd conformance && make test_csharp && cd ..
@@ -223,7 +228,8 @@ internal_install_python_deps() {
fi
# Install tox (OS X doesn't have pip).
if [ $(uname -s) == "Darwin" ]; then
- sudo easy_install tox
+ brew upgrade python
+ python3 -m pip install tox
else
sudo pip install tox
fi
@@ -346,6 +352,7 @@ generate_php_test_proto() {
rm -rf generated
mkdir generated
../../src/protoc --php_out=generated \
+ proto/empty/echo.proto \
proto/test.proto \
proto/test_include.proto \
proto/test_no_namespace.proto \
@@ -419,7 +426,7 @@ build_php5.5_c() {
use_php 5.5
wget https://phar.phpunit.de/phpunit-4.8.0.phar -O /usr/bin/phpunit
pushd php/tests
- /bin/bash ./test.sh
+ /bin/bash ./test.sh 5.5
popd
# TODO(teboring): Add it back
# pushd conformance
@@ -430,7 +437,7 @@ build_php5.5_c() {
build_php5.5_zts_c() {
use_php_zts 5.5
wget https://phar.phpunit.de/phpunit-4.8.0.phar -O /usr/bin/phpunit
- cd php/tests && /bin/bash ./test.sh && cd ../..
+ cd php/tests && /bin/bash ./test.sh 5.5-zts && cd ../..
# TODO(teboring): Add it back
# pushd conformance
# make test_php_zts_c
@@ -453,7 +460,7 @@ build_php5.6() {
build_php5.6_c() {
use_php 5.6
wget https://phar.phpunit.de/phpunit-5.7.0.phar -O /usr/bin/phpunit
- cd php/tests && /bin/bash ./test.sh && cd ../..
+ cd php/tests && /bin/bash ./test.sh 5.6 && cd ../..
# TODO(teboring): Add it back
# pushd conformance
# make test_php_c
@@ -463,7 +470,7 @@ build_php5.6_c() {
build_php5.6_zts_c() {
use_php_zts 5.6
wget https://phar.phpunit.de/phpunit-5.7.0.phar -O /usr/bin/phpunit
- cd php/tests && /bin/bash ./test.sh && cd ../..
+ cd php/tests && /bin/bash ./test.sh 5.6-zts && cd ../..
# TODO(teboring): Add it back
# pushd conformance
# make test_php_zts_c
@@ -511,7 +518,7 @@ build_php7.0() {
build_php7.0_c() {
use_php 7.0
wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit
- cd php/tests && /bin/bash ./test.sh && cd ../..
+ cd php/tests && /bin/bash ./test.sh 7.0 && cd ../..
# TODO(teboring): Add it back
# pushd conformance
# make test_php_c
@@ -521,7 +528,7 @@ build_php7.0_c() {
build_php7.0_zts_c() {
use_php_zts 7.0
wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit
- cd php/tests && /bin/bash ./test.sh && cd ../..
+ cd php/tests && /bin/bash ./test.sh 7.0-zts && cd ../..
# TODO(teboring): Add it back.
# pushd conformance
# make test_php_zts_c
@@ -575,7 +582,7 @@ build_php7.1() {
build_php7.1_c() {
use_php 7.1
wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit
- cd php/tests && /bin/bash ./test.sh && cd ../..
+ cd php/tests && /bin/bash ./test.sh 7.1 && cd ../..
pushd conformance
# make test_php_c
popd
@@ -584,7 +591,7 @@ build_php7.1_c() {
build_php7.1_zts_c() {
use_php_zts 7.1
wget https://phar.phpunit.de/phpunit-5.6.0.phar -O /usr/bin/phpunit
- cd php/tests && /bin/bash ./test.sh && cd ../..
+ cd php/tests && /bin/bash ./test.sh 7.1-zts && cd ../..
pushd conformance
# make test_php_c
popd