aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/distrib
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2017-04-24 13:31:20 +0200
committerGravatar Jan Tattermusch <jtattermusch@google.com>2017-09-11 11:03:05 +0200
commit5a2a792509af457322b8fc63eff3ec1ee360b0a0 (patch)
tree44ed4ecbe9ffb3b7b7861f9b6f25feba33539eee /test/distrib
parentca7084bced8db50bc242a06b430ba468145982fa (diff)
add cmake distribtest
Diffstat (limited to 'test/distrib')
-rwxr-xr-xtest/distrib/cpp/run_distrib_test_cmake.sh66
-rwxr-xr-xtest/distrib/cpp/run_distrib_test_routeguide.sh (renamed from test/distrib/cpp/run_distrib_test.sh)0
2 files changed, 66 insertions, 0 deletions
diff --git a/test/distrib/cpp/run_distrib_test_cmake.sh b/test/distrib/cpp/run_distrib_test_cmake.sh
new file mode 100755
index 0000000000..a81de57810
--- /dev/null
+++ b/test/distrib/cpp/run_distrib_test_cmake.sh
@@ -0,0 +1,66 @@
+#!/bin/bash
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -ex
+
+cd $(dirname $0)/../../..
+
+echo "deb http://ftp.debian.org/debian jessie-backports main" | tee /etc/apt/sources.list.d/jessie-backports.list
+apt-get update
+#apt-get install -t jessie-backports -y libc-ares-dev # we need specifically version 1.12
+apt-get install -t jessie-backports -y libssl-dev
+
+# Install c-ares
+cd third_party/cares/cares
+git fetch origin
+git checkout cares-1_13_0
+mkdir -p cmake/build
+cd cmake/build
+cmake -DCMAKE_BUILD_TYPE=Release ../..
+make -j4 install
+cd ../../../../..
+
+# Install zlib
+cd third_party/zlib
+mkdir -p cmake/build
+cd cmake/build
+cmake -DCMAKE_BUILD_TYPE=Release ../..
+make -j4 install
+cd ../../../..
+
+# Install protobuf
+cd third_party/protobuf
+mkdir -p cmake/build
+cd cmake/build
+cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release ..
+make -j4 install
+cd ../../../..
+
+# TODO: Install boringssl
+
+# Install gRPC
+mkdir -p cmake/build
+cd cmake/build
+cmake -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF -DgRPC_PROTOBUF_PROVIDER=package -DgRPC_ZLIB_PROVIDER=package -DgRPC_CARES_PROVIDER=package -DgRPC_SSL_PROVIDER=package -DCMAKE_BUILD_TYPE=Release ../..
+make -j4 install
+cd ../..
+
+# Build helloworld example using cmake
+cd examples/cpp/helloworld
+mkdir -p cmake/build
+cd cmake/build
+cmake ../..
+make
+
diff --git a/test/distrib/cpp/run_distrib_test.sh b/test/distrib/cpp/run_distrib_test_routeguide.sh
index b043075d93..b043075d93 100755
--- a/test/distrib/cpp/run_distrib_test.sh
+++ b/test/distrib/cpp/run_distrib_test_routeguide.sh