add cmake distribtest

pull/12469/head
Jan Tattermusch 8 years ago
parent ca7084bced
commit 5a2a792509
  1. 66
      test/distrib/cpp/run_distrib_test_cmake.sh
  2. 0
      test/distrib/cpp/run_distrib_test_routeguide.sh
  3. 2
      tools/dockerfile/distribtest/cpp_jessie_x64/Dockerfile
  4. 12
      tools/run_tests/artifacts/distribtest_targets.py

@ -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

@ -27,4 +27,6 @@ RUN apt-get update && apt-get install -y \
pkg-config \
unzip && apt-get clean
RUN apt-get update && apt-get install -y cmake golang && apt-get clean
CMD ["bash"]

@ -255,12 +255,13 @@ class PHPDistribTest(object):
class CppDistribTest(object):
"""Tests Cpp make intall by building examples."""
def __init__(self, platform, arch, docker_suffix=None):
self.name = 'cpp_%s_%s_%s' % (platform, arch, docker_suffix)
def __init__(self, platform, arch, docker_suffix=None, testcase=None):
self.name = 'cpp_%s_%s_%s_%s' % (platform, arch, docker_suffix, testcase)
self.platform = platform
self.arch = arch
self.docker_suffix = docker_suffix
self.labels = ['distribtest', 'cpp', platform, arch, docker_suffix]
self.testcase = testcase
self.labels = ['distribtest', 'cpp', platform, arch, docker_suffix, testcase]
def pre_build_jobspecs(self):
return []
@ -271,7 +272,7 @@ class CppDistribTest(object):
'tools/dockerfile/distribtest/cpp_%s_%s' % (
self.docker_suffix,
self.arch),
'test/distrib/cpp/run_distrib_test.sh')
'test/distrib/cpp/run_distrib_test_%s.sh' % self.testcase)
else:
raise Exception("Not supported yet.")
@ -281,7 +282,8 @@ class CppDistribTest(object):
def targets():
"""Gets list of supported targets"""
return [CppDistribTest('linux', 'x64', 'jessie'),
return [CppDistribTest('linux', 'x64', 'jessie', 'routeguide'),
CppDistribTest('linux', 'x64', 'jessie', 'cmake'),
CSharpDistribTest('linux', 'x64', 'wheezy'),
CSharpDistribTest('linux', 'x64', 'jessie'),
CSharpDistribTest('linux', 'x86', 'jessie'),

Loading…
Cancel
Save