diff options
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 40 |
1 files changed, 23 insertions, 17 deletions
@@ -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 @@ -44,10 +47,7 @@ build_cpp() { # appears to be missing it: https://github.com/travis-ci/travis-ci/issues/6996 if [[ $(type cmake 2>/dev/null) ]]; then # Verify benchmarking code can build successfully. - git submodule init - git submodule update - cd third_party/benchmark && cmake -DCMAKE_BUILD_TYPE=Release && make && cd ../.. - cd benchmarks && make && ./generate-datasets && cd .. + cd benchmarks && make cpp-benchmark && cd .. else echo "" echo "WARNING: Skipping validation of the bench marking code, cmake isn't installed." @@ -56,6 +56,8 @@ build_cpp() { } build_cpp_distcheck() { + # Initialize any submodules. + git submodule update --init --recursive ./autogen.sh ./configure make dist @@ -87,9 +89,7 @@ build_cpp_distcheck() { } build_csharp() { - # Just for the conformance tests. We don't currently - # need to really build protoc, but it's simplest to keep with the - # conventions of the other builds. + # Required for conformance tests and to regenerate protos. internal_build_cpp NUGET=/usr/local/bin/nuget.exe @@ -104,6 +104,10 @@ build_csharp() { (cd dotnettmp; dotnet new > /dev/null) rm -rf dotnettmp + # 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 .. @@ -224,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 @@ -347,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 \ @@ -420,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 @@ -431,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 @@ -454,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 @@ -464,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 @@ -512,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 @@ -522,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 @@ -576,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 @@ -585,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 |