aboutsummaryrefslogtreecommitdiff
path: root/tests.sh
diff options
context:
space:
mode:
authorThomas Van Lenten <thomasvl@google.com>2016-12-08 16:19:58 -0500
committerThomas Van Lenten <thomasvl@google.com>2016-12-09 10:16:21 -0500
commitbc9d0774f374ffa5128e2d5c6c62db556a6a4968 (patch)
treecffa45ca3a625bb8d9433ee656b10586ed1b7fd9 /tests.sh
parent2754586fa4e4fb75b13cb1915dce566e30b7db2c (diff)
downloadprotobuf-bc9d0774f374ffa5128e2d5c6c62db556a6a4968.tar.gz
protobuf-bc9d0774f374ffa5128e2d5c6c62db556a6a4968.tar.bz2
protobuf-bc9d0774f374ffa5128e2d5c6c62db556a6a4968.zip
Skip benchmark test if cmake isn't installed.
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh20
1 files changed, 15 insertions, 5 deletions
diff --git a/tests.sh b/tests.sh
index d1e337d5..ab6d1d61 100755
--- a/tests.sh
+++ b/tests.sh
@@ -38,11 +38,21 @@ build_cpp() {
make check -j2
cd conformance && make test_cpp && cd ..
- # 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 ..
+ # The benchmark code depends on cmake, so test if it is installed before
+ # trying to do the build.
+ # NOTE: The travis macOS images say they have cmake, but the xcode8.1 image
+ # 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 ..
+ else
+ echo ""
+ echo "WARNING: Skipping validation of the bench marking code, cmake isn't installed."
+ echo ""
+ fi
}
build_cpp_distcheck() {