Merge pull request #14120 from jakobr-google/dart

Add Dart support in interop test suite
pull/14629/head
Jan Tattermusch 7 years ago committed by GitHub
commit c1e6a845a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      templates/tools/dockerfile/interoptest/grpc_interop_dart/Dockerfile.template
  2. 28
      templates/tools/dockerfile/interoptest/grpc_interop_dart/build_interop.sh.template
  3. 18
      tools/dockerfile/interoptest/grpc_interop_dart/Dockerfile
  4. 26
      tools/dockerfile/interoptest/grpc_interop_dart/build_interop.sh
  5. 1
      tools/internal_ci/helper_scripts/prepare_build_interop_rc
  6. 1
      tools/internal_ci/helper_scripts/prepare_build_macos_interop_rc
  7. 1
      tools/interop_matrix/client_matrix.py
  8. 8
      tools/run_tests/dockerize/build_interop_image.sh
  9. 34
      tools/run_tests/run_interop_tests.py

@ -0,0 +1,20 @@
%YAML 1.2
--- |
# 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.
FROM google/dart:latest
# Define the default command.
CMD ["bash"]

@ -0,0 +1,28 @@
%YAML 1.2
--- |
#!/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.
#
# Builds Dart interop server and client in a base image.
set -e
mkdir -p /var/local/git
git clone /var/local/jenkins/grpc-dart /var/local/git/grpc-dart
# copy service account keys if available
cp -r /var/local/jenkins/service_account $HOME || true
cd /var/local/git/grpc-dart/interop
/usr/lib/dart/bin/pub get

@ -0,0 +1,18 @@
# 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.
FROM google/dart:latest
# Define the default command.
CMD ["bash"]

@ -0,0 +1,26 @@
#!/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.
#
# Builds Dart interop server and client in a base image.
set -e
mkdir -p /var/local/git
git clone /var/local/jenkins/grpc-dart /var/local/git/grpc-dart
# copy service account keys if available
cp -r /var/local/jenkins/service_account $HOME || true
cd /var/local/git/grpc-dart/interop
/usr/lib/dart/bin/pub get

@ -27,6 +27,7 @@ git submodule update --init
git clone --recursive https://github.com/grpc/grpc-go ./../grpc-go
git clone --recursive https://github.com/grpc/grpc-java ./../grpc-java
git clone --recursive https://github.com/grpc/grpc-node ./../grpc-node
git clone --recursive https://github.com/grpc/grpc-dart ./../grpc-dart
# Download json file.
mkdir ~/service_account

@ -32,6 +32,7 @@ brew install md5sha1sum
git clone --recursive https://github.com/grpc/grpc-go ./../grpc-go
git clone --recursive https://github.com/grpc/grpc-java ./../grpc-java
git clone --recursive https://github.com/grpc/grpc-node ./../grpc-node
git clone --recursive https://github.com/grpc/grpc-dart ./../grpc-dart
# Set up Docker for Mac
docker-machine create -d virtualbox --virtualbox-share-folder "/Users/kbuilder/workspace:" default

@ -18,6 +18,7 @@
def get_github_repo(lang):
return {
'dart': 'https://github.com/grpc/grpc-dart.git',
'go': 'https://github.com/grpc/grpc-go.git',
'java': 'https://github.com/grpc/grpc-java.git',
'node': 'https://github.com/grpc/grpc-node.git',

@ -48,6 +48,14 @@ else
echo "WARNING: grpc-go not found, it won't be mounted to the docker container."
fi
echo "GRPC_DART_ROOT: ${GRPC_DART_ROOT:=$(cd ../grpc-dart && pwd)}"
if [ -n "$GRPC_DART_ROOT" ]
then
MOUNT_ARGS+=" -v $GRPC_DART_ROOT:/var/local/jenkins/grpc-dart:ro"
else
echo "WARNING: grpc-dart not found, it won't be mounted to the docker container."
fi
echo "GRPC_NODE_ROOT: ${GRPC_NODE_ROOT:=$(cd ../grpc-node && pwd)}"
if [ -n "$GRPC_NODE_ROOT" ]
then

@ -167,6 +167,36 @@ class CSharpCoreCLRLanguage:
return 'csharpcoreclr'
class DartLanguage:
def __init__(self):
self.client_cwd = '../grpc-dart/interop'
self.server_cwd = '../grpc-dart/interop'
self.http2_cwd = '../grpc-dart/interop'
self.safename = str(self)
def client_cmd(self, args):
return ['dart', 'bin/client.dart'] + args
def cloud_to_prod_env(self):
return {}
def server_cmd(self, args):
return ['dart', 'bin/server.dart'] + args
def global_env(self):
return {}
def unimplemented_test_cases(self):
return _SKIP_COMPRESSION
def unimplemented_test_cases_server(self):
return _SKIP_COMPRESSION
def __str__(self):
return 'dart'
class JavaLanguage:
def __init__(self):
@ -524,6 +554,7 @@ _LANGUAGES = {
'c++': CXXLanguage(),
'csharp': CSharpLanguage(),
'csharpcoreclr': CSharpCoreCLRLanguage(),
'dart': DartLanguage(),
'go': GoLanguage(),
'java': JavaLanguage(),
'javaokhttp': JavaOkHttpClient(),
@ -537,7 +568,8 @@ _LANGUAGES = {
# languages supported as cloud_to_cloud servers
_SERVERS = [
'c++', 'node', 'csharp', 'csharpcoreclr', 'java', 'go', 'ruby', 'python'
'c++', 'node', 'csharp', 'csharpcoreclr', 'java', 'go', 'ruby', 'python',
'dart'
]
_TEST_CASES = [

Loading…
Cancel
Save