From 6c857eab57f241741881b8e8696df44506c6a8fc Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 5 Feb 2016 12:19:07 -0800 Subject: allow parallel docker run --- tools/jenkins/build_and_run_docker.sh | 3 --- 1 file changed, 3 deletions(-) (limited to 'tools') diff --git a/tools/jenkins/build_and_run_docker.sh b/tools/jenkins/build_and_run_docker.sh index b77cd0aebb..92dbbc6f38 100755 --- a/tools/jenkins/build_and_run_docker.sh +++ b/tools/jenkins/build_and_run_docker.sh @@ -37,9 +37,6 @@ cd $(dirname $0)/../.. git_root=$(pwd) cd - -# Create a local branch so the child Docker script won't complain -git branch -f jenkins-docker - # Inputs # DOCKERFILE_DIR - Directory in which Dockerfile file is located. # DOCKER_RUN_SCRIPT - Script to run under docker (relative to grpc repo root) -- cgit v1.2.3 From 92711bbc1271691e9593ee2fd5a7ad27288baa0a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 5 Feb 2016 13:10:24 -0800 Subject: make git clone optional --- tools/jenkins/docker_run.sh | 14 ++++++++++---- tools/run_tests/distribtest_targets.py | 3 ++- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/jenkins/docker_run.sh b/tools/jenkins/docker_run.sh index 49553aae2f..6fbae40ac2 100755 --- a/tools/jenkins/docker_run.sh +++ b/tools/jenkins/docker_run.sh @@ -33,16 +33,22 @@ set -e -mkdir -p /var/local/git -git clone --recursive "$EXTERNAL_GIT_ROOT" /var/local/git/grpc +if [ "$RELATIVE_COPY_PATH" == "" ] +then + mkdir -p /var/local/git + git clone --recursive "$EXTERNAL_GIT_ROOT" /var/local/git/grpc +else + mkdir -p "/var/local/git/grpc/$RELATIVE_COPY_PATH" + cp -r "$EXTERNAL_GIT_ROOT/$RELATIVE_COPY_PATH/*" "/var/local/git/grpc/$RELATIVE_COPY_PATH" +fi if [ -x "$(command -v rvm)" ] then rvm use ruby-2.1 fi -cd /var/local/git/grpc - nvm use 4 || true +cd /var/local/git/grpc + $RUN_COMMAND diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py index e9a80d2cf4..a8c9020585 100644 --- a/tools/run_tests/distribtest_targets.py +++ b/tools/run_tests/distribtest_targets.py @@ -43,7 +43,8 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, for k,v in environ.iteritems(): docker_args += ['-e', '%s=%s' % (k, v)] docker_env = {'DOCKERFILE_DIR': dockerfile_dir, - 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh'} + 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh', + 'RELATIVE_COPY_PATH': 'test/distrib'} jobspec = jobset.JobSpec( cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, environ=docker_env, -- cgit v1.2.3 From 5c04760d46f2628a83106d048e732c997fed8801 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 5 Feb 2016 14:25:56 -0800 Subject: Change default on Python install option --- src/python/grpcio/commands.py | 2 +- test/distrib/python/run_distrib_test.sh | 3 +-- tools/run_tests/build_artifact_python.sh | 10 ++++++---- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'tools') diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index 490d0f07b3..31bd00e94e 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -135,7 +135,7 @@ class Install(install.install, EggNameMixin): def initialize_options(self): install.install.initialize_options(self) - self.use_grpc_custom_bdist = False + self.use_grpc_custom_bdist = bool(int(os.environ.get('GRPC_PYTHON_USE_CUSTOM_BDIST', '1'))) def finalize_options(self): install.install.finalize_options(self) diff --git a/test/distrib/python/run_distrib_test.sh b/test/distrib/python/run_distrib_test.sh index a185bcbc26..2148be121a 100755 --- a/test/distrib/python/run_distrib_test.sh +++ b/test/distrib/python/run_distrib_test.sh @@ -52,7 +52,6 @@ pip install --upgrade futures GRPC_PYTHON_BINARIES_REPOSITORY="${BDIST_DIR}" \ pip install \ - "${SDIST_ARCHIVE}" \ - --install-option="--use-grpc-custom-bdist" + "${SDIST_ARCHIVE}" python distribtest.py diff --git a/tools/run_tests/build_artifact_python.sh b/tools/run_tests/build_artifact_python.sh index 48cf390f69..835fad83e1 100755 --- a/tools/run_tests/build_artifact_python.sh +++ b/tools/run_tests/build_artifact_python.sh @@ -39,11 +39,13 @@ then pip install -rrequirements.txt fi -GRPC_PYTHON_BUILD_WITH_CYTHON=1 ${SETARCH_CMD} python setup.py \ - bdist_wheel \ - sdist \ +GRPC_PYTHON_USE_CUSTOM_BDIST=0 \ +GRPC_PYTHON_BUILD_WITH_CYTHON=1 \ +${SETARCH_CMD} python setup.py \ + bdist_wheel \ + sdist \ bdist_egg_grpc_custom mkdir -p artifacts -cp -r dist/* artifacts \ No newline at end of file +cp -r dist/* artifacts -- cgit v1.2.3 From b5f7397b08de46e5241f7bcf74a4662917a42c0d Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 5 Feb 2016 13:53:47 -0800 Subject: cleanup distribtest Dockerimages --- tools/dockerfile/distribtest/csharp_centos7_x64/Dockerfile | 1 - tools/dockerfile/distribtest/csharp_jessie_x64/Dockerfile | 2 +- tools/dockerfile/distribtest/csharp_jessie_x86/Dockerfile | 2 +- tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile | 2 +- tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile | 2 +- tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile | 2 +- tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile | 2 +- tools/dockerfile/distribtest/csharp_wheezy_x64/Dockerfile | 2 +- tools/dockerfile/distribtest/node_centos7_x64/Dockerfile | 1 - tools/dockerfile/distribtest/node_jessie_x64/Dockerfile | 2 +- tools/dockerfile/distribtest/node_jessie_x86/Dockerfile | 2 +- tools/dockerfile/distribtest/node_ubuntu1204_x64/Dockerfile | 2 +- tools/dockerfile/distribtest/node_ubuntu1404_x64/Dockerfile | 2 +- tools/dockerfile/distribtest/node_ubuntu1504_x64/Dockerfile | 2 +- tools/dockerfile/distribtest/node_ubuntu1510_x64/Dockerfile | 2 +- tools/dockerfile/distribtest/node_ubuntu1604_x64/Dockerfile | 2 +- tools/dockerfile/distribtest/python_arch_x64/Dockerfile | 1 - tools/dockerfile/distribtest/python_centos6_x64/Dockerfile | 1 - tools/dockerfile/distribtest/python_centos7_x64/Dockerfile | 1 - tools/dockerfile/distribtest/python_fedora20_x64/Dockerfile | 7 +------ tools/dockerfile/distribtest/python_fedora21_x64/Dockerfile | 7 +------ tools/dockerfile/distribtest/python_fedora22_x64/Dockerfile | 7 +------ tools/dockerfile/distribtest/python_fedora23_x64/Dockerfile | 7 +------ tools/dockerfile/distribtest/python_jessie_x64/Dockerfile | 4 +--- tools/dockerfile/distribtest/python_jessie_x86/Dockerfile | 4 +--- tools/dockerfile/distribtest/python_opensuse_x64/Dockerfile | 2 -- tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile | 6 +----- tools/dockerfile/distribtest/python_ubuntu1404_x64/Dockerfile | 6 +----- tools/dockerfile/distribtest/python_ubuntu1504_x64/Dockerfile | 6 +----- tools/dockerfile/distribtest/python_ubuntu1510_x64/Dockerfile | 6 +----- tools/dockerfile/distribtest/python_ubuntu1604_x64/Dockerfile | 6 +----- tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile | 4 +--- tools/dockerfile/distribtest/ruby_centos6_x64/Dockerfile | 2 -- tools/dockerfile/distribtest/ruby_centos7_x64/Dockerfile | 2 -- tools/dockerfile/distribtest/ruby_fedora20_x64/Dockerfile | 6 +----- tools/dockerfile/distribtest/ruby_fedora21_x64/Dockerfile | 6 +----- tools/dockerfile/distribtest/ruby_fedora22_x64/Dockerfile | 6 +----- tools/dockerfile/distribtest/ruby_fedora23_x64/Dockerfile | 6 +----- tools/dockerfile/distribtest/ruby_jessie_x64/Dockerfile | 5 +---- tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile | 5 +---- tools/dockerfile/distribtest/ruby_opensuse_x64/Dockerfile | 2 -- tools/dockerfile/distribtest/ruby_ubuntu1204_x64/Dockerfile | 5 +---- tools/dockerfile/distribtest/ruby_ubuntu1404_x64/Dockerfile | 5 +---- tools/dockerfile/distribtest/ruby_ubuntu1504_x64/Dockerfile | 5 +---- tools/dockerfile/distribtest/ruby_ubuntu1510_x64/Dockerfile | 5 +---- tools/dockerfile/distribtest/ruby_ubuntu1604_x64/Dockerfile | 5 +---- tools/dockerfile/distribtest/ruby_wheezy_x64/Dockerfile | 5 +---- tools/jenkins/docker_run.sh | 4 ++-- tools/run_tests/distribtest_targets.py | 4 ++-- 49 files changed, 42 insertions(+), 141 deletions(-) (limited to 'tools') diff --git a/tools/dockerfile/distribtest/csharp_centos7_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_centos7_x64/Dockerfile index 17e9698904..03b5b364f8 100644 --- a/tools/dockerfile/distribtest/csharp_centos7_x64/Dockerfile +++ b/tools/dockerfile/distribtest/csharp_centos7_x64/Dockerfile @@ -33,6 +33,5 @@ RUN rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E03 RUN yum-config-manager --add-repo http://download.mono-project.com/repo/centos/ RUN yum install -y mono -RUN yum install -y git RUN yum install -y unzip RUN yum install -y nuget diff --git a/tools/dockerfile/distribtest/csharp_jessie_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_jessie_x64/Dockerfile index 840ecf0fc2..1cadba3b7b 100644 --- a/tools/dockerfile/distribtest/csharp_jessie_x64/Dockerfile +++ b/tools/dockerfile/distribtest/csharp_jessie_x64/Dockerfile @@ -40,4 +40,4 @@ RUN apt-get update && apt-get install -y \ ca-certificates-mono \ nuget -RUN apt-get update && apt-get install -y git unzip +RUN apt-get update && apt-get install -y unzip diff --git a/tools/dockerfile/distribtest/csharp_jessie_x86/Dockerfile b/tools/dockerfile/distribtest/csharp_jessie_x86/Dockerfile index 3a50da4936..be962828c2 100644 --- a/tools/dockerfile/distribtest/csharp_jessie_x86/Dockerfile +++ b/tools/dockerfile/distribtest/csharp_jessie_x86/Dockerfile @@ -40,4 +40,4 @@ RUN apt-get update && apt-get install -y \ ca-certificates-mono \ nuget -RUN apt-get update && apt-get install -y git unzip +RUN apt-get update && apt-get install -y unzip diff --git a/tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile index 901c981acb..3d04d032b5 100644 --- a/tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile +++ b/tools/dockerfile/distribtest/csharp_ubuntu1404_x64/Dockerfile @@ -37,4 +37,4 @@ RUN apt-get update && apt-get install -y \ ca-certificates-mono \ nuget -RUN apt-get update && apt-get install -y git unzip +RUN apt-get update && apt-get install -y unzip diff --git a/tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile index 1b8d454681..5eec570491 100644 --- a/tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile +++ b/tools/dockerfile/distribtest/csharp_ubuntu1504_x64/Dockerfile @@ -37,4 +37,4 @@ RUN apt-get update && apt-get install -y \ ca-certificates-mono \ nuget -RUN apt-get update && apt-get install -y git unzip +RUN apt-get update && apt-get install -y unzip diff --git a/tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile index a6c26a4b9e..a6d60fb4b9 100644 --- a/tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile +++ b/tools/dockerfile/distribtest/csharp_ubuntu1510_x64/Dockerfile @@ -37,4 +37,4 @@ RUN apt-get update && apt-get install -y \ ca-certificates-mono \ nuget -RUN apt-get update && apt-get install -y git unzip +RUN apt-get update && apt-get install -y unzip diff --git a/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile index c6a8634937..61472704d7 100644 --- a/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile +++ b/tools/dockerfile/distribtest/csharp_ubuntu1604_x64/Dockerfile @@ -34,4 +34,4 @@ RUN apt-get update && apt-get install -y \ ca-certificates-mono \ nuget -RUN apt-get update && apt-get install -y git unzip +RUN apt-get update && apt-get install -y unzip diff --git a/tools/dockerfile/distribtest/csharp_wheezy_x64/Dockerfile b/tools/dockerfile/distribtest/csharp_wheezy_x64/Dockerfile index dd865e8bbc..9039c3c509 100644 --- a/tools/dockerfile/distribtest/csharp_wheezy_x64/Dockerfile +++ b/tools/dockerfile/distribtest/csharp_wheezy_x64/Dockerfile @@ -29,4 +29,4 @@ FROM mono:4.2.2.30 -RUN apt-get update && apt-get install -y git unzip +RUN apt-get update && apt-get install -y unzip diff --git a/tools/dockerfile/distribtest/node_centos7_x64/Dockerfile b/tools/dockerfile/distribtest/node_centos7_x64/Dockerfile index 9c1f5ee729..f6e1664086 100644 --- a/tools/dockerfile/distribtest/node_centos7_x64/Dockerfile +++ b/tools/dockerfile/distribtest/node_centos7_x64/Dockerfile @@ -29,7 +29,6 @@ FROM centos:7 -RUN yum install -y git RUN yum install -y curl # Install nvm diff --git a/tools/dockerfile/distribtest/node_jessie_x64/Dockerfile b/tools/dockerfile/distribtest/node_jessie_x64/Dockerfile index 69a071500e..4ca5e86563 100644 --- a/tools/dockerfile/distribtest/node_jessie_x64/Dockerfile +++ b/tools/dockerfile/distribtest/node_jessie_x64/Dockerfile @@ -29,7 +29,7 @@ FROM debian:jessie -RUN apt-get update && apt-get install -y curl git +RUN apt-get update && apt-get install -y curl # Install nvm RUN touch .profile diff --git a/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile b/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile index 173c70360d..bd40ab2b4c 100644 --- a/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile +++ b/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile @@ -29,7 +29,7 @@ FROM 32bit/debian:jessie -RUN apt-get update && apt-get install -y curl git +RUN apt-get update && apt-get install -y git # Install nvm RUN touch .profile diff --git a/tools/dockerfile/distribtest/node_ubuntu1204_x64/Dockerfile b/tools/dockerfile/distribtest/node_ubuntu1204_x64/Dockerfile index c53a4aa305..0134dc964e 100644 --- a/tools/dockerfile/distribtest/node_ubuntu1204_x64/Dockerfile +++ b/tools/dockerfile/distribtest/node_ubuntu1204_x64/Dockerfile @@ -29,7 +29,7 @@ FROM ubuntu:12.04 -RUN apt-get update && apt-get install -y curl git +RUN apt-get update && apt-get install -y curl # Install nvm RUN touch .profile diff --git a/tools/dockerfile/distribtest/node_ubuntu1404_x64/Dockerfile b/tools/dockerfile/distribtest/node_ubuntu1404_x64/Dockerfile index 8fe6ae1f33..0fae447946 100644 --- a/tools/dockerfile/distribtest/node_ubuntu1404_x64/Dockerfile +++ b/tools/dockerfile/distribtest/node_ubuntu1404_x64/Dockerfile @@ -29,7 +29,7 @@ FROM ubuntu:14.04 -RUN apt-get update && apt-get install -y curl git +RUN apt-get update && apt-get install -y curl # Install nvm RUN touch .profile diff --git a/tools/dockerfile/distribtest/node_ubuntu1504_x64/Dockerfile b/tools/dockerfile/distribtest/node_ubuntu1504_x64/Dockerfile index 013c2a0c72..55da46c3be 100644 --- a/tools/dockerfile/distribtest/node_ubuntu1504_x64/Dockerfile +++ b/tools/dockerfile/distribtest/node_ubuntu1504_x64/Dockerfile @@ -29,7 +29,7 @@ FROM ubuntu:15.04 -RUN apt-get update && apt-get install -y curl git +RUN apt-get update && apt-get install -y curl # Install nvm RUN touch .profile diff --git a/tools/dockerfile/distribtest/node_ubuntu1510_x64/Dockerfile b/tools/dockerfile/distribtest/node_ubuntu1510_x64/Dockerfile index 43b3ae2738..c050cab7d3 100644 --- a/tools/dockerfile/distribtest/node_ubuntu1510_x64/Dockerfile +++ b/tools/dockerfile/distribtest/node_ubuntu1510_x64/Dockerfile @@ -29,7 +29,7 @@ FROM ubuntu:15.10 -RUN apt-get update && apt-get install -y curl git +RUN apt-get update && apt-get install -y curl # Install nvm RUN touch .profile diff --git a/tools/dockerfile/distribtest/node_ubuntu1604_x64/Dockerfile b/tools/dockerfile/distribtest/node_ubuntu1604_x64/Dockerfile index 3eae75475c..ab9e8a32e3 100644 --- a/tools/dockerfile/distribtest/node_ubuntu1604_x64/Dockerfile +++ b/tools/dockerfile/distribtest/node_ubuntu1604_x64/Dockerfile @@ -29,7 +29,7 @@ FROM ubuntu:16.04 -RUN apt-get update && apt-get install -y curl git +RUN apt-get update && apt-get install -y curl # Install nvm RUN touch .profile diff --git a/tools/dockerfile/distribtest/python_arch_x64/Dockerfile b/tools/dockerfile/distribtest/python_arch_x64/Dockerfile index 4d10e240c6..53bb8e8708 100644 --- a/tools/dockerfile/distribtest/python_arch_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_arch_x64/Dockerfile @@ -30,7 +30,6 @@ FROM base/archlinux RUN pacman --noconfirm -Syy -RUN pacman --noconfirm -S git RUN pacman --noconfirm -S python RUN pacman --noconfirm -S python-pip diff --git a/tools/dockerfile/distribtest/python_centos6_x64/Dockerfile b/tools/dockerfile/distribtest/python_centos6_x64/Dockerfile index 683686c6db..3889f8862f 100644 --- a/tools/dockerfile/distribtest/python_centos6_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_centos6_x64/Dockerfile @@ -29,7 +29,6 @@ FROM centos:6 -RUN yum install -y git RUN yum install -y python RUN rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm diff --git a/tools/dockerfile/distribtest/python_centos7_x64/Dockerfile b/tools/dockerfile/distribtest/python_centos7_x64/Dockerfile index 6b70f65f10..114957b573 100644 --- a/tools/dockerfile/distribtest/python_centos7_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_centos7_x64/Dockerfile @@ -29,7 +29,6 @@ FROM centos:7 -RUN yum install -y git RUN yum install -y python RUN yum install -y epel-release RUN yum install -y python-pip diff --git a/tools/dockerfile/distribtest/python_fedora20_x64/Dockerfile b/tools/dockerfile/distribtest/python_fedora20_x64/Dockerfile index 1c91594363..d58036410f 100644 --- a/tools/dockerfile/distribtest/python_fedora20_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_fedora20_x64/Dockerfile @@ -29,9 +29,4 @@ FROM fedora:20 -RUN yum clean all -RUN yum update -y -RUN yum install -y git -RUN yum install -y python -RUN yum install -y python-pip - +RUN yum clean all && yum update -y && yum install -y python python-pip diff --git a/tools/dockerfile/distribtest/python_fedora21_x64/Dockerfile b/tools/dockerfile/distribtest/python_fedora21_x64/Dockerfile index e35de109ea..b44fcff7e3 100644 --- a/tools/dockerfile/distribtest/python_fedora21_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_fedora21_x64/Dockerfile @@ -29,9 +29,4 @@ FROM fedora:21 -RUN yum clean all -RUN yum update -y -RUN yum install -y git -RUN yum install -y python -RUN yum install -y python-pip - +RUN yum clean all && yum update -y && yum install -y python python-pip diff --git a/tools/dockerfile/distribtest/python_fedora22_x64/Dockerfile b/tools/dockerfile/distribtest/python_fedora22_x64/Dockerfile index 69c3b541d3..c6415946c3 100644 --- a/tools/dockerfile/distribtest/python_fedora22_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_fedora22_x64/Dockerfile @@ -29,9 +29,4 @@ FROM fedora:22 -RUN yum clean all -RUN yum update -y -RUN yum install -y git -RUN yum install -y python -RUN yum install -y python-pip - +RUN yum clean all && yum update -y && yum install -y python python-pip diff --git a/tools/dockerfile/distribtest/python_fedora23_x64/Dockerfile b/tools/dockerfile/distribtest/python_fedora23_x64/Dockerfile index 74639a3118..6c834d2bc2 100644 --- a/tools/dockerfile/distribtest/python_fedora23_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_fedora23_x64/Dockerfile @@ -29,9 +29,4 @@ FROM fedora:23 -RUN yum clean all -RUN yum update -y -RUN yum install -y git -RUN yum install -y python -RUN yum install -y python-pip - +RUN yum clean all && yum update -y && yum install -y python python-pip diff --git a/tools/dockerfile/distribtest/python_jessie_x64/Dockerfile b/tools/dockerfile/distribtest/python_jessie_x64/Dockerfile index 3d511e267a..5778d604c8 100644 --- a/tools/dockerfile/distribtest/python_jessie_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_jessie_x64/Dockerfile @@ -29,6 +29,4 @@ FROM debian:jessie -RUN apt-get update -RUN apt-get install -y git python python-pip - +RUN apt-get update && apt-get install -y python python-pip diff --git a/tools/dockerfile/distribtest/python_jessie_x86/Dockerfile b/tools/dockerfile/distribtest/python_jessie_x86/Dockerfile index 035d56b655..cb6ec22d0a 100644 --- a/tools/dockerfile/distribtest/python_jessie_x86/Dockerfile +++ b/tools/dockerfile/distribtest/python_jessie_x86/Dockerfile @@ -29,6 +29,4 @@ FROM 32bit/debian:jessie -RUN apt-get update -RUN apt-get install -y git python python-pip - +RUN apt-get update && apt-get install -y python python-pip diff --git a/tools/dockerfile/distribtest/python_opensuse_x64/Dockerfile b/tools/dockerfile/distribtest/python_opensuse_x64/Dockerfile index 032beb97e5..417d9e0293 100644 --- a/tools/dockerfile/distribtest/python_opensuse_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_opensuse_x64/Dockerfile @@ -29,7 +29,5 @@ FROM opensuse:42.1 -RUN zypper --non-interactive install git RUN zypper --non-interactive install python RUN zypper --non-interactive install python-pip - diff --git a/tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile b/tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile index 9dbf90f511..a48ce0eeef 100644 --- a/tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_ubuntu1204_x64/Dockerfile @@ -29,8 +29,4 @@ FROM ubuntu:12.04 -RUN apt-get update -y -RUN apt-get install -y git -RUN apt-get install -y python -RUN apt-get install -y python-pip - +RUN apt-get update -y && apt-get install -y python python-pip diff --git a/tools/dockerfile/distribtest/python_ubuntu1404_x64/Dockerfile b/tools/dockerfile/distribtest/python_ubuntu1404_x64/Dockerfile index 3b366a9bb4..18dbfd4657 100644 --- a/tools/dockerfile/distribtest/python_ubuntu1404_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_ubuntu1404_x64/Dockerfile @@ -29,8 +29,4 @@ FROM ubuntu:14.04 -RUN apt-get update -y -RUN apt-get install -y git -RUN apt-get install -y python -RUN apt-get install -y python-pip - +RUN apt-get update -y && apt-get install -y python python-pip diff --git a/tools/dockerfile/distribtest/python_ubuntu1504_x64/Dockerfile b/tools/dockerfile/distribtest/python_ubuntu1504_x64/Dockerfile index de90b5b7e2..444a54d14b 100644 --- a/tools/dockerfile/distribtest/python_ubuntu1504_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_ubuntu1504_x64/Dockerfile @@ -29,8 +29,4 @@ FROM ubuntu:15.04 -RUN apt-get update -y -RUN apt-get install -y git -RUN apt-get install -y python -RUN apt-get install -y python-pip - +RUN apt-get update -y && apt-get install -y python python-pip diff --git a/tools/dockerfile/distribtest/python_ubuntu1510_x64/Dockerfile b/tools/dockerfile/distribtest/python_ubuntu1510_x64/Dockerfile index d10e04aacc..245ffb9413 100644 --- a/tools/dockerfile/distribtest/python_ubuntu1510_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_ubuntu1510_x64/Dockerfile @@ -29,8 +29,4 @@ FROM ubuntu:15.10 -RUN apt-get update -y -RUN apt-get install -y git -RUN apt-get install -y python -RUN apt-get install -y python-pip - +RUN apt-get update -y && apt-get install -y python python-pip diff --git a/tools/dockerfile/distribtest/python_ubuntu1604_x64/Dockerfile b/tools/dockerfile/distribtest/python_ubuntu1604_x64/Dockerfile index bc56285a3d..a1ac3051ba 100644 --- a/tools/dockerfile/distribtest/python_ubuntu1604_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_ubuntu1604_x64/Dockerfile @@ -29,8 +29,4 @@ FROM ubuntu:16.04 -RUN apt-get update -y -RUN apt-get install -y git -RUN apt-get install -y python -RUN apt-get install -y python-pip - +RUN apt-get update -y && apt-get install -y python python-pip diff --git a/tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile b/tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile index 895dd96747..46353b92d6 100644 --- a/tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_wheezy_x64/Dockerfile @@ -29,6 +29,4 @@ FROM debian:wheezy -RUN apt-get update -RUN apt-get install -y git python python-pip - +RUN apt-get update -y && apt-get install -y python python-pip diff --git a/tools/dockerfile/distribtest/ruby_centos6_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_centos6_x64/Dockerfile index 28a5c4ad71..fd2cf63a59 100644 --- a/tools/dockerfile/distribtest/ruby_centos6_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_centos6_x64/Dockerfile @@ -29,6 +29,4 @@ FROM centos:6 -RUN yum install -y git RUN yum install -y ruby - diff --git a/tools/dockerfile/distribtest/ruby_centos7_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_centos7_x64/Dockerfile index bdc100ee1c..5bb9bd6fa6 100644 --- a/tools/dockerfile/distribtest/ruby_centos7_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_centos7_x64/Dockerfile @@ -29,6 +29,4 @@ FROM centos:7 -RUN yum install -y git RUN yum install -y ruby - diff --git a/tools/dockerfile/distribtest/ruby_fedora20_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_fedora20_x64/Dockerfile index 50ff0b038b..9f23be986f 100644 --- a/tools/dockerfile/distribtest/ruby_fedora20_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_fedora20_x64/Dockerfile @@ -29,8 +29,4 @@ FROM fedora:20 -RUN yum clean all -RUN yum update -y -RUN yum install -y git -RUN yum install -y ruby - +RUN yum clean all && yum update -y && yum install -y ruby diff --git a/tools/dockerfile/distribtest/ruby_fedora21_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_fedora21_x64/Dockerfile index 219ecc8b53..57106a4894 100644 --- a/tools/dockerfile/distribtest/ruby_fedora21_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_fedora21_x64/Dockerfile @@ -29,8 +29,4 @@ FROM fedora:21 -RUN yum clean all -RUN yum update -y -RUN yum install -y git -RUN yum install -y ruby - +RUN yum clean all && yum update -y && yum install -y ruby diff --git a/tools/dockerfile/distribtest/ruby_fedora22_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_fedora22_x64/Dockerfile index 49d4c7d7f8..d770177381 100644 --- a/tools/dockerfile/distribtest/ruby_fedora22_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_fedora22_x64/Dockerfile @@ -29,8 +29,4 @@ FROM fedora:22 -RUN yum clean all -RUN yum update -y -RUN yum install -y git -RUN yum install -y ruby - +RUN yum clean all && yum update -y && yum install -y ruby diff --git a/tools/dockerfile/distribtest/ruby_fedora23_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_fedora23_x64/Dockerfile index 3c5363fb63..2c9b78ed08 100644 --- a/tools/dockerfile/distribtest/ruby_fedora23_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_fedora23_x64/Dockerfile @@ -29,8 +29,4 @@ FROM fedora:23 -RUN yum clean all -RUN yum update -y -RUN yum install -y git -RUN yum install -y ruby - +RUN yum clean all && yum update -y && yum install -y ruby diff --git a/tools/dockerfile/distribtest/ruby_jessie_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_jessie_x64/Dockerfile index 6a3d7edba0..4784bd73b4 100644 --- a/tools/dockerfile/distribtest/ruby_jessie_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_jessie_x64/Dockerfile @@ -29,7 +29,4 @@ FROM debian:jessie -RUN apt-get update -RUN apt-get install -y git -RUN apt-get install -y ruby-full - +RUN apt-get update && apt-get install -y ruby-full diff --git a/tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile b/tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile index ca3b731f56..4f649cbc03 100644 --- a/tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_jessie_x86/Dockerfile @@ -29,7 +29,4 @@ FROM 32bit/debian:jessie -RUN apt-get update -RUN apt-get install -y git -RUN apt-get install -y ruby-full - +RUN apt-get update && apt-get install -y ruby-full diff --git a/tools/dockerfile/distribtest/ruby_opensuse_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_opensuse_x64/Dockerfile index a9423042ea..a249950998 100644 --- a/tools/dockerfile/distribtest/ruby_opensuse_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_opensuse_x64/Dockerfile @@ -29,6 +29,4 @@ FROM opensuse:42.1 -RUN zypper --non-interactive install git RUN zypper --non-interactive install ruby - diff --git a/tools/dockerfile/distribtest/ruby_ubuntu1204_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_ubuntu1204_x64/Dockerfile index 66f17100cf..95b7702afb 100644 --- a/tools/dockerfile/distribtest/ruby_ubuntu1204_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_ubuntu1204_x64/Dockerfile @@ -29,7 +29,4 @@ FROM ubuntu:12.04 -RUN apt-get update -y -RUN apt-get install -y git -RUN apt-get install -y ruby-full - +RUN apt-get update -y && apt-get install -y ruby-full diff --git a/tools/dockerfile/distribtest/ruby_ubuntu1404_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_ubuntu1404_x64/Dockerfile index dc533a5fca..66ba01d37e 100644 --- a/tools/dockerfile/distribtest/ruby_ubuntu1404_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_ubuntu1404_x64/Dockerfile @@ -29,7 +29,4 @@ FROM ubuntu:14.04 -RUN apt-get update -y -RUN apt-get install -y git -RUN apt-get install -y ruby-full - +RUN apt-get update -y && apt-get install -y ruby-full diff --git a/tools/dockerfile/distribtest/ruby_ubuntu1504_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_ubuntu1504_x64/Dockerfile index 7e4f203041..81e7ca1d3c 100644 --- a/tools/dockerfile/distribtest/ruby_ubuntu1504_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_ubuntu1504_x64/Dockerfile @@ -29,7 +29,4 @@ FROM ubuntu:15.04 -RUN apt-get update -y -RUN apt-get install -y git -RUN apt-get install -y ruby-full - +RUN apt-get update -y && apt-get install -y ruby-full diff --git a/tools/dockerfile/distribtest/ruby_ubuntu1510_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_ubuntu1510_x64/Dockerfile index 43ef63ec8c..37b897f0f5 100644 --- a/tools/dockerfile/distribtest/ruby_ubuntu1510_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_ubuntu1510_x64/Dockerfile @@ -29,7 +29,4 @@ FROM ubuntu:15.10 -RUN apt-get update -y -RUN apt-get install -y git -RUN apt-get install -y ruby-full - +RUN apt-get update -y && apt-get install -y ruby-full diff --git a/tools/dockerfile/distribtest/ruby_ubuntu1604_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_ubuntu1604_x64/Dockerfile index 3b63976d3c..5c54b8f754 100644 --- a/tools/dockerfile/distribtest/ruby_ubuntu1604_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_ubuntu1604_x64/Dockerfile @@ -29,7 +29,4 @@ FROM ubuntu:16.04 -RUN apt-get update -y -RUN apt-get install -y git -RUN apt-get install -y ruby-full - +RUN apt-get update -y && apt-get install -y ruby-full diff --git a/tools/dockerfile/distribtest/ruby_wheezy_x64/Dockerfile b/tools/dockerfile/distribtest/ruby_wheezy_x64/Dockerfile index 1ff083d43c..2e6593c230 100644 --- a/tools/dockerfile/distribtest/ruby_wheezy_x64/Dockerfile +++ b/tools/dockerfile/distribtest/ruby_wheezy_x64/Dockerfile @@ -29,7 +29,4 @@ FROM debian:wheezy -RUN apt-get update -RUN apt-get install -y git -RUN apt-get install -y ruby-full - +RUN apt-get update && apt-get install -y ruby-full diff --git a/tools/jenkins/docker_run.sh b/tools/jenkins/docker_run.sh index 6fbae40ac2..519dc5cade 100755 --- a/tools/jenkins/docker_run.sh +++ b/tools/jenkins/docker_run.sh @@ -31,7 +31,7 @@ # This script is invoked by build_docker_* inside a docker # container. You should never need to call this script on your own. -set -e +set -ex if [ "$RELATIVE_COPY_PATH" == "" ] then @@ -39,7 +39,7 @@ then git clone --recursive "$EXTERNAL_GIT_ROOT" /var/local/git/grpc else mkdir -p "/var/local/git/grpc/$RELATIVE_COPY_PATH" - cp -r "$EXTERNAL_GIT_ROOT/$RELATIVE_COPY_PATH/*" "/var/local/git/grpc/$RELATIVE_COPY_PATH" + cp -r "$EXTERNAL_GIT_ROOT/$RELATIVE_COPY_PATH"/* "/var/local/git/grpc/$RELATIVE_COPY_PATH" fi if [ -x "$(command -v rvm)" ] diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py index a8c9020585..a1e45ece9d 100644 --- a/tools/run_tests/distribtest_targets.py +++ b/tools/run_tests/distribtest_targets.py @@ -38,13 +38,13 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, """Creates jobspec for a task running under docker.""" environ = environ.copy() environ['RUN_COMMAND'] = shell_command + environ['RELATIVE_COPY_PATH'] = 'test/distrib' docker_args=[] for k,v in environ.iteritems(): docker_args += ['-e', '%s=%s' % (k, v)] docker_env = {'DOCKERFILE_DIR': dockerfile_dir, - 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh', - 'RELATIVE_COPY_PATH': 'test/distrib'} + 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh'} jobspec = jobset.JobSpec( cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, environ=docker_env, -- cgit v1.2.3 From 6b5555ead1a0a7141d28bec505f5421a4101763d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 5 Feb 2016 16:07:18 -0800 Subject: Fix docker files, distrib test script --- test/distrib/python/run_distrib_test.sh | 17 +++++++++-------- tools/dockerfile/distribtest/python_arch_x64/Dockerfile | 5 +++-- .../distribtest/python_centos6_x64/Dockerfile | 2 ++ 3 files changed, 14 insertions(+), 10 deletions(-) (limited to 'tools') diff --git a/test/distrib/python/run_distrib_test.sh b/test/distrib/python/run_distrib_test.sh index 2148be121a..08856ad388 100755 --- a/test/distrib/python/run_distrib_test.sh +++ b/test/distrib/python/run_distrib_test.sh @@ -42,16 +42,17 @@ then exit 1 fi -# TODO(jtattermusch): this shouldn't be required -pip install --upgrade six +PIP=pip2 +which $PIP || PIP=pip +PYTHON=python2 +which $PYTHON || PYTHON=python -# TODO(jtattermusch): if these don't get preinstalled, pip tries to install them -# with --use-grpc-custom-bdist option, which obviously fails. -pip install --upgrade enum34 -pip install --upgrade futures +# TODO(jtattermusch): this shouldn't be required +$PIP install --upgrade six GRPC_PYTHON_BINARIES_REPOSITORY="${BDIST_DIR}" \ - pip install \ + $PIP install \ "${SDIST_ARCHIVE}" -python distribtest.py +$PYTHON distribtest.py + diff --git a/tools/dockerfile/distribtest/python_arch_x64/Dockerfile b/tools/dockerfile/distribtest/python_arch_x64/Dockerfile index 4d10e240c6..536ad86d53 100644 --- a/tools/dockerfile/distribtest/python_arch_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_arch_x64/Dockerfile @@ -31,6 +31,7 @@ FROM base/archlinux RUN pacman --noconfirm -Syy RUN pacman --noconfirm -S git -RUN pacman --noconfirm -S python -RUN pacman --noconfirm -S python-pip +RUN pacman --noconfirm -S openssl +RUN pacman --noconfirm -S python2 +RUN pacman --noconfirm -S python2-pip diff --git a/tools/dockerfile/distribtest/python_centos6_x64/Dockerfile b/tools/dockerfile/distribtest/python_centos6_x64/Dockerfile index 683686c6db..55677fc10c 100644 --- a/tools/dockerfile/distribtest/python_centos6_x64/Dockerfile +++ b/tools/dockerfile/distribtest/python_centos6_x64/Dockerfile @@ -35,3 +35,5 @@ RUN yum install -y python RUN rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm RUN yum install -y python-pip +RUN pip install --upgrade pip + -- cgit v1.2.3 From 524d7ed6723aefd78cc980ccae432959b10cc7b5 Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Fri, 5 Feb 2016 16:35:48 -0800 Subject: Adding a script to spawn MacOS's build environment. --- tools/distrib/build_ruby_environment_macos.sh | 59 +++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 tools/distrib/build_ruby_environment_macos.sh (limited to 'tools') diff --git a/tools/distrib/build_ruby_environment_macos.sh b/tools/distrib/build_ruby_environment_macos.sh new file mode 100644 index 0000000000..b2be86f6f3 --- /dev/null +++ b/tools/distrib/build_ruby_environment_macos.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# Copyright 2015-2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +CROSS_RUBY=`mktemp` + +curl https://raw.githubusercontent.com/rake-compiler/rake-compiler/v0.9.5/tasks/bin/cross-ruby.rake > $CROSS_RUBY + +patch $CROSS_RUBY << EOF +--- cross-ruby.rake 2016-02-05 16:26:53.000000000 -0800 ++++ cross-ruby.rake.patched 2016-02-05 16:27:33.000000000 -0800 +@@ -133,7 +133,8 @@ + "--host=#{MINGW_HOST}", + "--target=#{MINGW_TARGET}", + "--build=#{RUBY_BUILD}", +- '--enable-shared', ++ '--enable-static', ++ '--disable-shared', + '--disable-install-doc', + '--without-tk', + '--without-tcl' +EOF + +MAKE="make -j8" + +for v in 2.3.0 2.2.2 2.1.6 2.0.0-p645 ; do + rake -f $CROSS_RUBY cross-ruby VERSION=$v HOST=x86_64-darwin11 +done + +sed 's/x86_64-darwin-11/universal-darwin/' ~/.rake-compiler/config.yaml > $CROSS_RUBY +mv $CROSS_RUBY > ~/.rake-compiler/config.yaml -- cgit v1.2.3 From ec187ce677fdfd9114d82c63ee73c5ec60fac97a Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 6 Feb 2016 01:45:46 +0100 Subject: Updating the ruby artifact build script. --- tools/run_tests/build_artifact_ruby.sh | 37 +++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/run_tests/build_artifact_ruby.sh b/tools/run_tests/build_artifact_ruby.sh index 482d128be3..8033c3157a 100755 --- a/tools/run_tests/build_artifact_ruby.sh +++ b/tools/run_tests/build_artifact_ruby.sh @@ -27,16 +27,43 @@ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - set -ex - cd $(dirname $0)/../.. +set +ex +[[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh +set -ex + +SYSTEM=`uname | cut -f 1 -d_` +if [ "$SYSTEM" == "MSYS" ] ; then + SYSTEM=MINGW32 +fi +if [ "$SYSTEM" == "MINGW64" ] ; then + SYSTEM=MINGW32 +fi -${SETARCH_CMD} bundle install +if [ "$SYSTEM" == "MINGW32" ] ; then + echo "Need Linux to build the Windows ruby gem." + exit 1 +fi -${SETARCH_CMD} rake native gem +if [ "$SYSTEM" == "Darwin" ] ; then + set +ex + rvm use ruby-head + set -ex +fi + +if [ "$SYSTEM" == "Linux" ] ; then + set +ex + ${SETARCH_CMD} bundle install + set -ex +fi + +${SETARCH_CMD} rake gem:native + +if [ "$SYSTEM" == "Darwin" ] ; then + rm pkg/`ls pkg/*.gem | grep -v darwin` +fi mkdir -p artifacts cp pkg/*.gem artifacts - -- cgit v1.2.3 From da46a701c4c48f49943b3f9ba06bb9f983b24709 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 6 Feb 2016 01:52:02 +0100 Subject: 2.1.6 doesn't work on MacOS (wheee...) --- Rakefile | 4 ++-- third_party/rake-compiler-dock/Dockerfile | 10 +++++----- tools/distrib/build_ruby_environment_macos.sh | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'tools') diff --git a/Rakefile b/Rakefile index 1f9bbcf7f6..f208a24fd3 100755 --- a/Rakefile +++ b/Rakefile @@ -103,10 +103,10 @@ task 'gem:native' do if RUBY_PLATFORM =~ /darwin/ FileUtils.touch 'grpc_c.32.ruby' FileUtils.touch 'grpc_c.64.ruby' - system "rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.6:2.0.0 V=#{verbose}" + system "rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.5:2.0.0 V=#{verbose}" else Rake::Task['dlls'].execute - docker_for_windows "bundle && rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.6:2.0.0 V=#{verbose}" + docker_for_windows "bundle && rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.5:2.0.0 V=#{verbose}" end end diff --git a/third_party/rake-compiler-dock/Dockerfile b/third_party/rake-compiler-dock/Dockerfile index be73e2d8f4..a8f5b8a116 100644 --- a/third_party/rake-compiler-dock/Dockerfile +++ b/third_party/rake-compiler-dock/Dockerfile @@ -107,9 +107,9 @@ RUN bash -c "rvm use 2.3.0 --default && \ rake-compiler cross-ruby VERSION=2.2.2 HOST=i686-w64-mingw32 && \ rake-compiler cross-ruby VERSION=2.2.2 HOST=x86_64-w64-mingw32 && \ rake-compiler cross-ruby VERSION=2.2.2 HOST=x86_64-linux-gnu && \ - rake-compiler cross-ruby VERSION=2.1.6 HOST=i686-w64-mingw32 && \ - rake-compiler cross-ruby VERSION=2.1.6 HOST=x86_64-w64-mingw32 && \ - rake-compiler cross-ruby VERSION=2.1.6 HOST=x86_64-linux-gnu && \ + rake-compiler cross-ruby VERSION=2.1.5 HOST=i686-w64-mingw32 && \ + rake-compiler cross-ruby VERSION=2.1.5 HOST=x86_64-w64-mingw32 && \ + rake-compiler cross-ruby VERSION=2.1.5 HOST=x86_64-linux-gnu && \ rake-compiler cross-ruby VERSION=2.0.0-p645 HOST=i686-w64-mingw32 && \ rake-compiler cross-ruby VERSION=2.0.0-p645 HOST=x86_64-w64-mingw32 && \ rake-compiler cross-ruby VERSION=2.0.0-p645 HOST=x86_64-linux-gnu && \ @@ -120,7 +120,7 @@ RUN bash -c "rvm use 2.3.0 --default && \ export MAKE=\"make -j`nproc`\" CFLAGS='-m32 -s -O1 -fno-omit-frame-pointer -fno-fast-math' LDFLAGS='-m32' && \ rake-compiler cross-ruby VERSION=2.3.0 HOST=i686-linux-gnu && \ rake-compiler cross-ruby VERSION=2.2.2 HOST=i686-linux-gnu && \ - rake-compiler cross-ruby VERSION=2.1.6 HOST=i686-linux-gnu && \ + rake-compiler cross-ruby VERSION=2.1.5 HOST=i686-linux-gnu && \ rake-compiler cross-ruby VERSION=2.0.0-p645 HOST=i686-linux-gnu && \ rm -rf ~/.rake-compiler/tmp/builds ~/.rake-compiler/sources && \ find /usr/local/rvm -type d -print0 | sudo xargs -0 chmod g+sw " @@ -164,6 +164,6 @@ RUN cp /tmp/build/runas /usr/local/bin/ # Install sudoers configuration RUN cp /tmp/build/sudoers /etc/sudoers.d/rake-compiler-dock -ENV RUBY_CC_VERSION 2.3.0:2.2.2:2.1.6:2.0.0 +ENV RUBY_CC_VERSION 2.3.0:2.2.2:2.1.5:2.0.0 CMD bash diff --git a/tools/distrib/build_ruby_environment_macos.sh b/tools/distrib/build_ruby_environment_macos.sh index b2be86f6f3..ccc5e20713 100644 --- a/tools/distrib/build_ruby_environment_macos.sh +++ b/tools/distrib/build_ruby_environment_macos.sh @@ -51,7 +51,7 @@ EOF MAKE="make -j8" -for v in 2.3.0 2.2.2 2.1.6 2.0.0-p645 ; do +for v in 2.3.0 2.2.2 2.1.5 2.0.0-p645 ; do rake -f $CROSS_RUBY cross-ruby VERSION=$v HOST=x86_64-darwin11 done -- cgit v1.2.3 From 700cae3b9eb3559cb52a3f2d6c19f852d565d89b Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 6 Feb 2016 01:52:38 +0100 Subject: Typo. --- tools/distrib/build_ruby_environment_macos.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/distrib/build_ruby_environment_macos.sh b/tools/distrib/build_ruby_environment_macos.sh index ccc5e20713..a876990b98 100644 --- a/tools/distrib/build_ruby_environment_macos.sh +++ b/tools/distrib/build_ruby_environment_macos.sh @@ -55,5 +55,5 @@ for v in 2.3.0 2.2.2 2.1.5 2.0.0-p645 ; do rake -f $CROSS_RUBY cross-ruby VERSION=$v HOST=x86_64-darwin11 done -sed 's/x86_64-darwin-11/universal-darwin/' ~/.rake-compiler/config.yaml > $CROSS_RUBY -mv $CROSS_RUBY > ~/.rake-compiler/config.yaml +sed 's/x86_64-darwin-11/universal-darwin/' ~/.rake-compiler/config.yml > $CROSS_RUBY +mv $CROSS_RUBY > ~/.rake-compiler/config.yml -- cgit v1.2.3 From 4bb713b84daef1b5a2737c004c7f39c26eae3bc1 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 6 Feb 2016 02:09:11 +0100 Subject: Last changes to build_artifact_ruby.sh --- tools/run_tests/build_artifact_ruby.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/run_tests/build_artifact_ruby.sh b/tools/run_tests/build_artifact_ruby.sh index 8033c3157a..69e4dcf85a 100755 --- a/tools/run_tests/build_artifact_ruby.sh +++ b/tools/run_tests/build_artifact_ruby.sh @@ -28,12 +28,17 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. set -ex + +SYSTEM=`uname | cut -f 1 -d_` + cd $(dirname $0)/../.. +if [ "$SYSTEM" == "Darwin" ] ; then + ./tools/distrib/build_ruby_environment_macos.sh +fi set +ex [[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh set -ex -SYSTEM=`uname | cut -f 1 -d_` if [ "$SYSTEM" == "MSYS" ] ; then SYSTEM=MINGW32 fi @@ -52,11 +57,9 @@ if [ "$SYSTEM" == "Darwin" ] ; then set -ex fi -if [ "$SYSTEM" == "Linux" ] ; then - set +ex - ${SETARCH_CMD} bundle install - set -ex -fi +set +ex +${SETARCH_CMD} bundle install +set -ex ${SETARCH_CMD} rake gem:native -- cgit v1.2.3 From 5bb9a916e29aee275378511ca38ab4fd9c5333b4 Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Fri, 5 Feb 2016 17:38:04 -0800 Subject: Update build_artifact_ruby.sh --- tools/run_tests/build_artifact_ruby.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/run_tests/build_artifact_ruby.sh b/tools/run_tests/build_artifact_ruby.sh index 69e4dcf85a..015f54f026 100755 --- a/tools/run_tests/build_artifact_ruby.sh +++ b/tools/run_tests/build_artifact_ruby.sh @@ -33,7 +33,7 @@ SYSTEM=`uname | cut -f 1 -d_` cd $(dirname $0)/../.. if [ "$SYSTEM" == "Darwin" ] ; then - ./tools/distrib/build_ruby_environment_macos.sh + /bin/bash ./tools/distrib/build_ruby_environment_macos.sh fi set +ex [[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh -- cgit v1.2.3 From 07854f7baa0f53f7fabf8edb9fa7c73bede4ca1a Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Fri, 5 Feb 2016 17:51:48 -0800 Subject: Update build_ruby_environment_macos.sh --- tools/distrib/build_ruby_environment_macos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/distrib/build_ruby_environment_macos.sh b/tools/distrib/build_ruby_environment_macos.sh index a876990b98..b6dec68c7f 100644 --- a/tools/distrib/build_ruby_environment_macos.sh +++ b/tools/distrib/build_ruby_environment_macos.sh @@ -30,7 +30,7 @@ set -ex -CROSS_RUBY=`mktemp` +CROSS_RUBY=`mktemp tmpfile.XXXXXXXX` curl https://raw.githubusercontent.com/rake-compiler/rake-compiler/v0.9.5/tasks/bin/cross-ruby.rake > $CROSS_RUBY -- cgit v1.2.3 From 3c6039222fd6493cfbde4d349d9722ccb3b452a4 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 5 Feb 2016 18:17:55 -0800 Subject: add build_package collector targets for python and ruby --- tools/run_tests/build_package_python.sh | 43 +++++++++++++++++++++++++++ tools/run_tests/build_package_ruby.sh | 43 +++++++++++++++++++++++++++ tools/run_tests/package_targets.py | 51 +++++++++++++++++++++++++++++---- 3 files changed, 131 insertions(+), 6 deletions(-) create mode 100755 tools/run_tests/build_package_python.sh create mode 100755 tools/run_tests/build_package_ruby.sh (limited to 'tools') diff --git a/tools/run_tests/build_package_python.sh b/tools/run_tests/build_package_python.sh new file mode 100755 index 0000000000..2511a6ae46 --- /dev/null +++ b/tools/run_tests/build_package_python.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +cd $(dirname $0)/../.. + +mkdir -p artifacts/ + +# All the python packages have been built in the artifact phase already +# and we only collect them here to deliver them to the distribtest phase. +cp -r $EXTERNAL_GIT_ROOT/architecture={x86,x64},language=python,platform={windows,linux,macos}/artifacts/* artifacts/ || true + +# TODO: all the artifact builder configurations generate a grpcio-VERSION.tar.gz +# source distribution package, and only one of them will end up +# in the artifacts/ directory. They should be all equivalent though. diff --git a/tools/run_tests/build_package_ruby.sh b/tools/run_tests/build_package_ruby.sh new file mode 100755 index 0000000000..1a5b94348d --- /dev/null +++ b/tools/run_tests/build_package_ruby.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +cd $(dirname $0)/../.. + +mkdir -p artifacts/ + +# All the ruby packages have been built in the artifact phase already +# and we only collect them here to deliver them to the distribtest phase. +cp -r $EXTERNAL_GIT_ROOT/architecture={x86,x64},language=ruby,platform={windows,linux,macos}/artifacts/* artifacts/ || true + +# TODO: all the artifact builder configurations generate a grpc-VERSION.gem +# source distribution package, and only one of them will end up +# in the artifacts/ directory. They should be all equivalent though. diff --git a/tools/run_tests/package_targets.py b/tools/run_tests/package_targets.py index 997bc57cc5..4ca8279f1b 100644 --- a/tools/run_tests/package_targets.py +++ b/tools/run_tests/package_targets.py @@ -68,11 +68,11 @@ def create_jobspec(name, cmdline, environ=None, cwd=None, shell=False, return jobspec -class CSharpNugetTarget: +class CSharpPackage: """Builds C# nuget packages.""" def __init__(self): - self.name = 'csharp_nuget' + self.name = 'csharp_package' self.labels = ['package', 'csharp', 'windows'] def pre_build_jobspecs(self): @@ -87,11 +87,12 @@ class CSharpNugetTarget: def __str__(self): return self.name -class NodeNpmBinaryTarget: - """Builds Node NPM package and collects binaries""" + +class NodePackage: + """Builds Node NPM package and collects precompiled binaries""" def __init__(self): - self.name = 'node_npm_binary' + self.name = 'node_package' self.labels = ['package', 'node', 'linux'] def pre_build_jobspecs(self): @@ -103,6 +104,44 @@ class NodeNpmBinaryTarget: 'tools/dockerfile/grpc_artifact_linux_x64', 'tools/run_tests/build_package_node.sh') + +class RubyPackage: + """Collects ruby gems created in the artifact phase""" + + def __init__(self): + self.name = 'ruby_package' + self.labels = ['package', 'ruby', 'linux'] + + def pre_build_jobspecs(self): + return [] + + def build_jobspec(self): + return create_docker_jobspec( + self.name, + 'tools/dockerfile/grpc_artifact_linux_x64', + 'tools/run_tests/build_package_ruby.sh') + + +class PythonPackage: + """Collects python eggs and wheels created in the artifact phase""" + + def __init__(self): + self.name = 'python_package' + self.labels = ['package', 'python', 'linux'] + + def pre_build_jobspecs(self): + return [] + + def build_jobspec(self): + return create_docker_jobspec( + self.name, + 'tools/dockerfile/grpc_artifact_linux_x64', + 'tools/run_tests/build_package_python.sh') + + def targets(): """Gets list of supported targets""" - return [CSharpNugetTarget(), NodeNpmBinaryTarget()] + return [CSharpPackage(), + NodePackage(), + RubyPackage(), + PythonPackage()] -- cgit v1.2.3 From 9d6de14fcfa85c380c6b342ea54baf6cb24f1dc6 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 6 Feb 2016 03:31:16 +0100 Subject: Typos. --- tools/distrib/build_ruby_environment_macos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/distrib/build_ruby_environment_macos.sh b/tools/distrib/build_ruby_environment_macos.sh index b6dec68c7f..317c2721c2 100644 --- a/tools/distrib/build_ruby_environment_macos.sh +++ b/tools/distrib/build_ruby_environment_macos.sh @@ -56,4 +56,4 @@ for v in 2.3.0 2.2.2 2.1.5 2.0.0-p645 ; do done sed 's/x86_64-darwin-11/universal-darwin/' ~/.rake-compiler/config.yml > $CROSS_RUBY -mv $CROSS_RUBY > ~/.rake-compiler/config.yml +mv $CROSS_RUBY ~/.rake-compiler/config.yml -- cgit v1.2.3 From ff2e76e286224306b08f77b264338cfb7be7cb3e Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 6 Feb 2016 03:36:18 +0100 Subject: rake-compiler builds aren't repeatable after all. --- tools/distrib/build_ruby_environment_macos.sh | 2 ++ tools/run_tests/build_artifact_ruby.sh | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/distrib/build_ruby_environment_macos.sh b/tools/distrib/build_ruby_environment_macos.sh index 317c2721c2..ff3a388eaf 100644 --- a/tools/distrib/build_ruby_environment_macos.sh +++ b/tools/distrib/build_ruby_environment_macos.sh @@ -30,6 +30,8 @@ set -ex +rm -rf ~/.rake-compiler + CROSS_RUBY=`mktemp tmpfile.XXXXXXXX` curl https://raw.githubusercontent.com/rake-compiler/rake-compiler/v0.9.5/tasks/bin/cross-ruby.rake > $CROSS_RUBY diff --git a/tools/run_tests/build_artifact_ruby.sh b/tools/run_tests/build_artifact_ruby.sh index 015f54f026..21daee7351 100755 --- a/tools/run_tests/build_artifact_ruby.sh +++ b/tools/run_tests/build_artifact_ruby.sh @@ -32,9 +32,6 @@ set -ex SYSTEM=`uname | cut -f 1 -d_` cd $(dirname $0)/../.. -if [ "$SYSTEM" == "Darwin" ] ; then - /bin/bash ./tools/distrib/build_ruby_environment_macos.sh -fi set +ex [[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh set -ex -- cgit v1.2.3 From cd7411466e3a434bc14cb3f2d2fc46f1f5754046 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 5 Feb 2016 19:52:36 -0800 Subject: make python jessie x86 distribtest pass --- tools/dockerfile/distribtest/python_jessie_x86/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools') diff --git a/tools/dockerfile/distribtest/python_jessie_x86/Dockerfile b/tools/dockerfile/distribtest/python_jessie_x86/Dockerfile index cb6ec22d0a..e9cf99142b 100644 --- a/tools/dockerfile/distribtest/python_jessie_x86/Dockerfile +++ b/tools/dockerfile/distribtest/python_jessie_x86/Dockerfile @@ -30,3 +30,8 @@ FROM 32bit/debian:jessie RUN apt-get update && apt-get install -y python python-pip + +# docker is running on a 64-bit machine, so we need to +# override "uname -m" to report i686 instead of x86_64, otherwise +# python will choose a wrong binary package to install. +ENTRYPOINT ["linux32"] -- cgit v1.2.3 From 0bd1da55936bae4bdd82ef40526b5de6105c8624 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 5 Feb 2016 20:21:17 -0800 Subject: fix some node distribtests --- test/distrib/node/run_distrib_test.sh | 7 ++++++- tools/dockerfile/distribtest/node_jessie_x86/Dockerfile | 2 +- tools/run_tests/distribtest_targets.py | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'tools') diff --git a/test/distrib/node/run_distrib_test.sh b/test/distrib/node/run_distrib_test.sh index 90637cc01d..ac9e7d7090 100755 --- a/test/distrib/node/run_distrib_test.sh +++ b/test/distrib/node/run_distrib_test.sh @@ -32,7 +32,12 @@ set -ex cd $(dirname $0) -nvm install $1 +NODE_VERSION="$1" + +# make sure nvm is available +source ~/.nvm/nvm.sh || true + +nvm install $NODE_VERSION npm install -g node-static diff --git a/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile b/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile index bd40ab2b4c..0408cbeeb0 100644 --- a/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile +++ b/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile @@ -29,7 +29,7 @@ FROM 32bit/debian:jessie -RUN apt-get update && apt-get install -y git +RUN apt-get update && apt-get install -y curl # Install nvm RUN touch .profile diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py index a1e45ece9d..f3ebc00b4e 100644 --- a/tools/run_tests/distribtest_targets.py +++ b/tools/run_tests/distribtest_targets.py @@ -105,8 +105,7 @@ class NodeDistribTest(object): 'tools/dockerfile/distribtest/node_%s_%s' % ( self.docker_suffix, self.arch), - # bash -l needed to make nvm available - 'bash -l test/distrib/node/run_distrib_test.sh %s' % ( + 'test/distrib/node/run_distrib_test.sh %s' % ( self.node_version)) def __str__(self): return self.name -- cgit v1.2.3 From b9e66cd283b5ec6b4cdaee6c0146f91c6c1e5387 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 6 Feb 2016 06:24:16 +0100 Subject: Removing architecture commands, and updating the bundler gem. --- tools/run_tests/build_artifact_ruby.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/run_tests/build_artifact_ruby.sh b/tools/run_tests/build_artifact_ruby.sh index 21daee7351..10fc997a83 100755 --- a/tools/run_tests/build_artifact_ruby.sh +++ b/tools/run_tests/build_artifact_ruby.sh @@ -55,10 +55,11 @@ if [ "$SYSTEM" == "Darwin" ] ; then fi set +ex -${SETARCH_CMD} bundle install +gem install bundle --update +bundle install set -ex -${SETARCH_CMD} rake gem:native +rake gem:native if [ "$SYSTEM" == "Darwin" ] ; then rm pkg/`ls pkg/*.gem | grep -v darwin` -- cgit v1.2.3 From bb439efb9db0aa83444f2f8f65fc069a175db9e3 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 6 Feb 2016 06:27:00 +0100 Subject: Typo. --- tools/run_tests/build_artifact_ruby.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/run_tests/build_artifact_ruby.sh b/tools/run_tests/build_artifact_ruby.sh index 10fc997a83..f7504a9614 100755 --- a/tools/run_tests/build_artifact_ruby.sh +++ b/tools/run_tests/build_artifact_ruby.sh @@ -55,7 +55,7 @@ if [ "$SYSTEM" == "Darwin" ] ; then fi set +ex -gem install bundle --update +gem install bundler --update bundle install set -ex -- cgit v1.2.3 From a677208073b4fc6e443e311caf2a8c51e20f5f98 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 6 Feb 2016 06:35:29 +0100 Subject: Typo. --- tools/run_tests/build_artifact_ruby.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/run_tests/build_artifact_ruby.sh b/tools/run_tests/build_artifact_ruby.sh index f7504a9614..7709fe12b1 100755 --- a/tools/run_tests/build_artifact_ruby.sh +++ b/tools/run_tests/build_artifact_ruby.sh @@ -62,7 +62,7 @@ set -ex rake gem:native if [ "$SYSTEM" == "Darwin" ] ; then - rm pkg/`ls pkg/*.gem | grep -v darwin` + rm `ls pkg/*.gem | grep -v darwin` fi mkdir -p artifacts -- cgit v1.2.3 From 412a39875e3a6039bc5fcd5dde82c3cd18cd5bf0 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 6 Feb 2016 07:25:32 +0100 Subject: Shortcut the artifact builder early. --- tools/jenkins/build_artifacts.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/jenkins/build_artifacts.sh b/tools/jenkins/build_artifacts.sh index 9af553ae48..c0acbdfb27 100755 --- a/tools/jenkins/build_artifacts.sh +++ b/tools/jenkins/build_artifacts.sh @@ -39,4 +39,8 @@ set -ex -o igncr || set -ex curr_platform="$platform" unset platform # variable named 'platform' breaks the windows build -python tools/run_tests/task_runner.py -f artifact $language $curr_platform $architecture +if [ "$curr_platform" == "linux" ] && [ "$language" == "ruby" ] ; then + ./tools/run_tests/build_artifact_ruby.sh +else + python tools/run_tests/task_runner.py -f artifact $language $curr_platform $architecture +fi -- cgit v1.2.3 From 32ee36d9800945535a87efdd0b57a64b3fe1b239 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 6 Feb 2016 07:45:04 +0100 Subject: Better to always use rvm. --- tools/run_tests/build_artifact_ruby.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/run_tests/build_artifact_ruby.sh b/tools/run_tests/build_artifact_ruby.sh index 7709fe12b1..727899db5e 100755 --- a/tools/run_tests/build_artifact_ruby.sh +++ b/tools/run_tests/build_artifact_ruby.sh @@ -48,13 +48,8 @@ if [ "$SYSTEM" == "MINGW32" ] ; then exit 1 fi -if [ "$SYSTEM" == "Darwin" ] ; then - set +ex - rvm use ruby-head - set -ex -fi - set +ex +rvm use default gem install bundler --update bundle install set -ex -- cgit v1.2.3 From 2cbc545f163281c4a784ebadbcfa5c395597a2a2 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 6 Feb 2016 07:47:32 +0100 Subject: Load RVM on Linux too... --- tools/run_tests/build_artifact_ruby.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'tools') diff --git a/tools/run_tests/build_artifact_ruby.sh b/tools/run_tests/build_artifact_ruby.sh index 727899db5e..2d97b4068b 100755 --- a/tools/run_tests/build_artifact_ruby.sh +++ b/tools/run_tests/build_artifact_ruby.sh @@ -34,6 +34,7 @@ SYSTEM=`uname | cut -f 1 -d_` cd $(dirname $0)/../.. set +ex [[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh +[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" set -ex if [ "$SYSTEM" == "MSYS" ] ; then -- cgit v1.2.3 From 23dadd920449634ae5a04ac7c1bb4b78d735ff96 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Sat, 6 Feb 2016 08:51:10 -0800 Subject: Try to make npm available on jessie x86 --- tools/dockerfile/distribtest/node_jessie_x86/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile b/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile index 0408cbeeb0..ca92b1923a 100644 --- a/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile +++ b/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile @@ -33,4 +33,8 @@ RUN apt-get update && apt-get install -y curl # Install nvm RUN touch .profile -RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash \ No newline at end of file +RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash + +# Install node 4, as on 32bit system, npm will be missing after nvm install +RUN curl -sL https://deb.nodesource.com/setup_4.x | bash - +RUN apt-get update && apt-get install -y nodejs -- cgit v1.2.3 From c83a9c01870c21ee0632342fe58b69d33cea7fb3 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Sat, 6 Feb 2016 14:53:28 -0800 Subject: enable C# distribtest on macos --- test/distrib/csharp/run_distrib_test.sh | 2 +- test/distrib/csharp/update_version.sh | 2 +- tools/run_tests/distribtest_targets.py | 36 ++++++++++++++++++++++++++------- 3 files changed, 31 insertions(+), 9 deletions(-) (limited to 'tools') diff --git a/test/distrib/csharp/run_distrib_test.sh b/test/distrib/csharp/run_distrib_test.sh index 5a01c91875..8ddb4c4bff 100755 --- a/test/distrib/csharp/run_distrib_test.sh +++ b/test/distrib/csharp/run_distrib_test.sh @@ -32,7 +32,7 @@ set -ex cd $(dirname $0) -unzip "$EXTERNAL_GIT_ROOT/input_artifacts/csharp_nugets.zip" -d TestNugetFeed +unzip -o "$EXTERNAL_GIT_ROOT/input_artifacts/csharp_nugets.zip" -d TestNugetFeed # TODO(jtattermusch): replace the version number ./update_version.sh 0.13.0 diff --git a/test/distrib/csharp/update_version.sh b/test/distrib/csharp/update_version.sh index 569f7ff4bd..f2554e8998 100755 --- a/test/distrib/csharp/update_version.sh +++ b/test/distrib/csharp/update_version.sh @@ -33,4 +33,4 @@ set -e cd $(dirname $0) # Replaces version placeholder with value provided as first argument. -sed -i "s/__GRPC_NUGET_VERSION__/$1/g" DistribTest/packages.config DistribTest/DistribTest.csproj +sed -ibak "s/__GRPC_NUGET_VERSION__/$1/g" DistribTest/packages.config DistribTest/DistribTest.csproj diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py index a1e45ece9d..965c7f8316 100644 --- a/tools/run_tests/distribtest_targets.py +++ b/tools/run_tests/distribtest_targets.py @@ -55,28 +55,49 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, return jobspec +def create_jobspec(name, cmdline, environ=None, shell=False, + flake_retries=0, timeout_retries=0): + """Creates jobspec.""" + jobspec = jobset.JobSpec( + cmdline=cmdline, + environ=environ, + shortname='distribtest.%s' % (name), + timeout_seconds=10*60, + flake_retries=flake_retries, + timeout_retries=timeout_retries, + shell=shell) + return jobspec + + class CSharpDistribTest(object): """Tests C# NuGet package""" - def __init__(self, platform, arch, docker_suffix): - self.name = 'csharp_nuget_%s_%s_%s' % (platform, arch, docker_suffix) + def __init__(self, platform, arch, docker_suffix=None): + self.name = 'csharp_nuget_%s_%s' % (platform, arch) self.platform = platform self.arch = arch self.docker_suffix = docker_suffix - self.labels = ['distribtest', 'csharp', platform, arch, docker_suffix] + self.labels = ['distribtest', 'csharp', platform, arch] + if docker_suffix: + self.name += '_%s' % docker_suffix + self.labels.append(docker_suffix) def pre_build_jobspecs(self): return [] def build_jobspec(self): - if not self.platform == 'linux': - raise Exception("Not supported yet.") - - return create_docker_jobspec(self.name, + if self.platform == 'linux': + return create_docker_jobspec(self.name, 'tools/dockerfile/distribtest/csharp_%s_%s' % ( self.docker_suffix, self.arch), 'test/distrib/csharp/run_distrib_test.sh') + elif self.platform == 'macos': + return create_jobspec(self.name, + ['test/distrib/csharp/run_distrib_test.sh'], + environ={'EXTERNAL_GIT_ROOT': '../../..'}) + else: + raise Exception("Not supported yet.") def __str__(self): return self.name @@ -176,6 +197,7 @@ def targets(): CSharpDistribTest('linux', 'x64', 'ubuntu1504'), CSharpDistribTest('linux', 'x64', 'ubuntu1510'), CSharpDistribTest('linux', 'x64', 'ubuntu1604'), + CSharpDistribTest('macos', 'x86'), PythonDistribTest('linux', 'x64', 'wheezy'), PythonDistribTest('linux', 'x64', 'jessie'), PythonDistribTest('linux', 'x86', 'jessie'), -- cgit v1.2.3 From e477b84c92c7655d1dc11fa1e687de7b60836927 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Sat, 6 Feb 2016 22:19:01 -0800 Subject: make node tests pass on macos --- tools/jenkins/docker_run_tests.sh | 2 -- tools/run_tests/build_node.sh | 4 ++++ tools/run_tests/pre_build_node.sh | 4 ++++ tools/run_tests/run_node.sh | 4 ++++ tools/run_tests/run_tests.py | 10 +++++++--- 5 files changed, 19 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/jenkins/docker_run_tests.sh b/tools/jenkins/docker_run_tests.sh index 26e5585d2d..12874386a3 100755 --- a/tools/jenkins/docker_run_tests.sh +++ b/tools/jenkins/docker_run_tests.sh @@ -43,8 +43,6 @@ chown `whoami` $XDG_CACHE_HOME mkdir -p /var/local/git git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc -nvm use 0.12 || true - if [ -x "$(command -v rvm)" ] then rvm use ruby-2.1 diff --git a/tools/run_tests/build_node.sh b/tools/run_tests/build_node.sh index 8f2ab4413a..9c4af07185 100755 --- a/tools/run_tests/build_node.sh +++ b/tools/run_tests/build_node.sh @@ -29,8 +29,12 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +NODE_VERSION=$1 +source ~/.nvm/nvm.sh set -ex +nvm use $NODE_VERSION + CONFIG=${CONFIG:-opt} # change to grpc repo root diff --git a/tools/run_tests/pre_build_node.sh b/tools/run_tests/pre_build_node.sh index 28ce354f27..40213b859a 100755 --- a/tools/run_tests/pre_build_node.sh +++ b/tools/run_tests/pre_build_node.sh @@ -29,8 +29,12 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +NODE_VERSION=$1 +source ~/.nvm/nvm.sh set -ex +nvm use $NODE_VERSION + export GRPC_CONFIG=${CONFIG:-opt} # Expire cache after 1 week diff --git a/tools/run_tests/run_node.sh b/tools/run_tests/run_node.sh index f93c9c30cb..40f61d77cc 100755 --- a/tools/run_tests/run_node.sh +++ b/tools/run_tests/run_node.sh @@ -28,8 +28,12 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +NODE_VERSION=$1 +source ~/.nvm/nvm.sh set -ex +nvm use $NODE_VERSION + CONFIG=${CONFIG:-opt} # change to grpc repo root diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 9e7b97c6a2..6dfdc705be 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -194,13 +194,17 @@ class CLanguage(object): class NodeLanguage(object): + def __init__(self): + self.node_version = '0.12' + def test_specs(self, config, args): - return [config.job_spec(['tools/run_tests/run_node.sh'], None, + return [config.job_spec(['tools/run_tests/run_node.sh', self.node_version], + None, environ=_FORCE_ENVIRON_FOR_WRAPPERS)] def pre_build_steps(self): # Default to 1 week cache expiration - return [['tools/run_tests/pre_build_node.sh']] + return [['tools/run_tests/pre_build_node.sh', self.node_version]] def make_targets(self, test_regex): return [] @@ -209,7 +213,7 @@ class NodeLanguage(object): return [] def build_steps(self): - return [['tools/run_tests/build_node.sh']] + return [['tools/run_tests/build_node.sh', self.node_version]] def post_tests_steps(self): return [] -- cgit v1.2.3 From 823b8a2ce2610d694ee5a2d0a7e4066c38253849 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Sat, 6 Feb 2016 22:34:13 -0800 Subject: fix copyright --- tools/run_tests/pre_build_node.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/run_tests/pre_build_node.sh b/tools/run_tests/pre_build_node.sh index 40213b859a..11f46d60fc 100755 --- a/tools/run_tests/pre_build_node.sh +++ b/tools/run_tests/pre_build_node.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without -- cgit v1.2.3 From b9e66cc551b1480e363667bac1d2162f7da7f27d Mon Sep 17 00:00:00 2001 From: Adele Zhou Date: Wed, 3 Feb 2016 13:12:23 -0800 Subject: Added test cases for Cloud gateway. --- tools/run_tests/interop_html_report.template | 42 ++++++++----- tools/run_tests/report_utils.py | 4 +- tools/run_tests/run_interop_tests.py | 88 +++++++++++++++++++--------- 3 files changed, 89 insertions(+), 45 deletions(-) (limited to 'tools') diff --git a/tools/run_tests/interop_html_report.template b/tools/run_tests/interop_html_report.template index 114a508c31..46cce426b7 100644 --- a/tools/run_tests/interop_html_report.template +++ b/tools/run_tests/interop_html_report.template @@ -64,17 +64,8 @@ % endif -% if num_failures > 1: -

${num_failures} tests failed!

-% elif num_failures: -

${num_failures} test failed!

-% else: -

All tests passed!

-% endif - -% if cloud_to_prod: +<%def name="display_cloud_to_prod_result(prod_server)"> ## Each column header is the client language. -

Cloud to Prod

@@ -87,15 +78,32 @@ % for client_lang in client_langs: <% if test_case in auth_test_cases: - shortname = 'cloud_to_prod_auth:%s:%s' % (client_lang, test_case) + shortname = 'cloud_to_prod_auth:%s:%s:%s' % ( + prod_server, client_lang, test_case) else: - shortname = 'cloud_to_prod:%s:%s' % (client_lang, test_case) + shortname = 'cloud_to_prod:%s:%s:%s' % ( + prod_server, client_lang, test_case) %> ${fill_one_test_result(shortname, resultset)} % endfor % endfor
Client languages ►
Test Cases ▼
+ + +% if num_failures > 1: +

${num_failures} tests failed!

+% elif num_failures: +

${num_failures} test failed!

+% else: +

All tests passed!

+% endif + +% if cloud_to_prod: + % for prod_server in prod_servers: +

Cloud to ${prod_server}

+ ${display_cloud_to_prod_result(prod_server)} + % endfor % endif % if http2_interop: @@ -108,7 +116,9 @@ ${server_lang} % endfor % if cloud_to_prod: - prod + % for prod_server in prod_servers: + ${prod_server} + % endfor % endif % for test_case in http2_cases: @@ -122,8 +132,10 @@ ${fill_one_http2_test_result(shortname, resultset)} % endfor % if cloud_to_prod: - <% shortname = 'cloud_to_prod:http2:%s' % test_case %> - ${fill_one_http2_test_result(shortname, resultset)} + % for prod_server in prod_servers: + <% shortname = 'cloud_to_prod:%s:http2:%s' % (prod_server, test_case) %> + ${fill_one_http2_test_result(shortname, resultset)} + % endfor % endif % endfor diff --git a/tools/run_tests/report_utils.py b/tools/run_tests/report_utils.py index 35f2069bee..437c4693a5 100644 --- a/tools/run_tests/report_utils.py +++ b/tools/run_tests/report_utils.py @@ -77,7 +77,7 @@ def render_junit_xml_report(resultset, xml_report): def render_interop_html_report( client_langs, server_langs, test_cases, auth_test_cases, http2_cases, - resultset, num_failures, cloud_to_prod, http2_interop): + resultset, num_failures, cloud_to_prod, prod_servers, http2_interop): """Generate HTML report for interop tests.""" template_file = 'tools/run_tests/interop_html_report.template' try: @@ -94,6 +94,7 @@ def render_interop_html_report( sorted_http2_cases = sorted(http2_cases) sorted_client_langs = sorted(client_langs) sorted_server_langs = sorted(server_langs) + sorted_prod_servers = sorted(prod_servers) args = {'client_langs': sorted_client_langs, 'server_langs': sorted_server_langs, @@ -103,6 +104,7 @@ def render_interop_html_report( 'resultset': resultset, 'num_failures': num_failures, 'cloud_to_prod': cloud_to_prod, + 'prod_servers': sorted_prod_servers, 'http2_interop': http2_interop} html_report_out_dir = 'reports' diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index fbc3b3cdf6..4a670e0c9d 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -422,12 +422,13 @@ def _job_kill_handler(job): time.sleep(2) -def cloud_to_prod_jobspec(language, test_case, docker_image=None, auth=False): +def cloud_to_prod_jobspec(language, test_case, server_host_name, + server_host_detail, docker_image=None, auth=False): """Creates jobspec for cloud-to-prod interop test""" container_name = None cmdargs = [ - '--server_host_override=grpc-test.sandbox.googleapis.com', - '--server_host=grpc-test.sandbox.googleapis.com', + '--server_host=%s' % server_host_detail[0], + '--server_host_override=%s' % server_host_detail[1], '--server_port=443', '--use_tls=true', '--test_case=%s' % test_case] @@ -440,7 +441,8 @@ def cloud_to_prod_jobspec(language, test_case, docker_image=None, auth=False): cwd = language.client_cwd if docker_image: - container_name = dockerjob.random_name('interop_client_%s' % language.safename) + container_name = dockerjob.random_name('interop_client_%s' % + language.safename) cmdline = docker_run_cmdline(cmdline, image=docker_image, cwd=cwd, @@ -455,7 +457,8 @@ def cloud_to_prod_jobspec(language, test_case, docker_image=None, auth=False): cmdline=cmdline, cwd=cwd, environ=environ, - shortname='%s:%s:%s' % (suite_name, language, test_case), + shortname='%s:%s:%s:%s' % (suite_name, server_host_name, language, + test_case), timeout_seconds=90, flake_retries=5 if args.allow_flakes else 0, timeout_retries=2 if args.allow_flakes else 0, @@ -491,7 +494,7 @@ def cloud_to_cloud_jobspec(language, test_case, server_name, server_host, cwd=cwd, environ=environ, shortname='cloud_to_cloud:%s:%s_server:%s' % (language, server_name, - test_case), + test_case), timeout_seconds=90, flake_retries=5 if args.allow_flakes else 0, timeout_retries=2 if args.allow_flakes else 0, @@ -572,6 +575,21 @@ def aggregate_http2_results(stdout): 'percent': 1.0 * passed / (passed + failed) } +# A dictionary of prod servers to test. +# Format: server_name: (server_host, server_host_override, errors_allowed) +# TODO(adelez): implement logic for errors_allowed where if the indicated tests +# fail, they don't impact the overall test result. +prod_servers = { + 'default': ('grpc-test.sandbox.googleapis.com', + 'grpc-test.sandbox.googleapis.com', False), + 'gateway_v2': ('grpc-test2.sandbox.googleapis.com', + 'grpc-test2.sandbox.googleapis.com', True), + 'cloud_gateway': ('216.239.32.255', 'grpc-test.sandbox.googleapis.com', + False), + 'cloud_gateway_v2': ('216.239.32.255', 'grpc-test2.sandbox.googleapis.com', + True) +} + argp = argparse.ArgumentParser(description='Run interop tests.') argp.add_argument('-l', '--language', choices=['all'] + sorted(_LANGUAGES), @@ -589,6 +607,12 @@ argp.add_argument('--cloud_to_prod_auth', action='store_const', const=True, help='Run cloud_to_prod_auth tests.') +argp.add_argument('--prod_servers', + choices=prod_servers.keys(), + default=['default'], + nargs='+', + help=('The servers to run cloud_to_prod and ' + 'cloud_to_prod_auth tests against.')) argp.add_argument('-s', '--server', choices=['all'] + sorted(_SERVERS), action='append', @@ -688,32 +712,37 @@ try: server_jobs[lang] = job server_addresses[lang] = ('localhost', job.mapped_port(_DEFAULT_SERVER_PORT)) - jobs = [] if args.cloud_to_prod: - for language in languages: - for test_case in _TEST_CASES: - if not test_case in language.unimplemented_test_cases(): - if not test_case in _SKIP_ADVANCED + _SKIP_COMPRESSION: - test_job = cloud_to_prod_jobspec(language, test_case, - docker_image=docker_images.get(str(language))) - jobs.append(test_job) - - if args.http2_interop: - for test_case in _HTTP2_TEST_CASES: - test_job = cloud_to_prod_jobspec(http2Interop, test_case, - docker_image=docker_images.get(str(http2Interop))) - jobs.append(test_job) - + for server_host_name in args.prod_servers: + for language in languages: + for test_case in _TEST_CASES: + if not test_case in language.unimplemented_test_cases(): + if not test_case in _SKIP_ADVANCED + _SKIP_COMPRESSION: + test_job = cloud_to_prod_jobspec( + language, test_case, server_host_name, + prod_servers[server_host_name], + docker_image=docker_images.get(str(language))) + jobs.append(test_job) + + if args.http2_interop: + for test_case in _HTTP2_TEST_CASES: + test_job = cloud_to_prod_jobspec( + http2Interop, test_case, server_host_name, + prod_servers[server_host_name], + docker_image=docker_images.get(str(http2Interop))) + jobs.append(test_job) if args.cloud_to_prod_auth: - for language in languages: - for test_case in _AUTH_TEST_CASES: - if not test_case in language.unimplemented_test_cases(): - test_job = cloud_to_prod_jobspec(language, test_case, - docker_image=docker_images.get(str(language)), - auth=True) - jobs.append(test_job) + for server_host_name in args.prod_servers: + for language in languages: + for test_case in _AUTH_TEST_CASES: + if not test_case in language.unimplemented_test_cases(): + test_job = cloud_to_prod_jobspec( + language, test_case, server_host_name, + prod_servers[server_host_name], + docker_image=docker_images.get(str(language)), auth=True) + jobs.append(test_job) for server in args.override_server: server_name = server[0] @@ -773,7 +802,8 @@ try: report_utils.render_interop_html_report( set([str(l) for l in languages]), servers, _TEST_CASES, _AUTH_TEST_CASES, _HTTP2_TEST_CASES, resultset, num_failures, - args.cloud_to_prod_auth or args.cloud_to_prod, args.http2_interop) + args.cloud_to_prod_auth or args.cloud_to_prod, args.prod_servers, + args.http2_interop) finally: # Check if servers are still running. -- cgit v1.2.3 From 474ccfcaedad31ce896a59b8100174a2c7d25ac7 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 8 Feb 2016 10:17:19 -0800 Subject: revert suspicious change to node_jessie_x86 --- tools/dockerfile/distribtest/node_jessie_x86/Dockerfile | 4 ---- 1 file changed, 4 deletions(-) (limited to 'tools') diff --git a/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile b/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile index ca92b1923a..8b97d8bb5a 100644 --- a/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile +++ b/tools/dockerfile/distribtest/node_jessie_x86/Dockerfile @@ -34,7 +34,3 @@ RUN apt-get update && apt-get install -y curl # Install nvm RUN touch .profile RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash - -# Install node 4, as on 32bit system, npm will be missing after nvm install -RUN curl -sL https://deb.nodesource.com/setup_4.x | bash - -RUN apt-get update && apt-get install -y nodejs -- cgit v1.2.3 From 6c90d898b625d9e52233328b41eb44a684d32aef Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 8 Feb 2016 10:27:50 -0800 Subject: Fix sanity --- examples/objective-c/helloworld/main.m | 2 +- src/objective-c/GRPCClient/private/GRPCChannel.h | 2 +- src/objective-c/GRPCClient/private/GRPCChannel.m | 2 +- src/objective-c/GRPCClient/private/GRPCHost.h | 2 +- src/objective-c/GRPCClient/private/GRPCHost.m | 2 +- tools/run_tests/report_utils.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/examples/objective-c/helloworld/main.m b/examples/objective-c/helloworld/main.m index 755dce33df..bf357990a5 100644 --- a/examples/objective-c/helloworld/main.m +++ b/examples/objective-c/helloworld/main.m @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.h b/src/objective-c/GRPCClient/private/GRPCChannel.h index 1888dea1b4..8661ae6f97 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannel.h +++ b/src/objective-c/GRPCClient/private/GRPCChannel.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m index 7a676060c1..7e55a473d7 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannel.m +++ b/src/objective-c/GRPCClient/private/GRPCChannel.m @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/objective-c/GRPCClient/private/GRPCHost.h b/src/objective-c/GRPCClient/private/GRPCHost.h index 69a115e88c..82c0ad6cf6 100644 --- a/src/objective-c/GRPCClient/private/GRPCHost.h +++ b/src/objective-c/GRPCClient/private/GRPCHost.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/objective-c/GRPCClient/private/GRPCHost.m b/src/objective-c/GRPCClient/private/GRPCHost.m index f750841a44..eb1db899b7 100644 --- a/src/objective-c/GRPCClient/private/GRPCHost.m +++ b/src/objective-c/GRPCClient/private/GRPCHost.m @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/tools/run_tests/report_utils.py b/tools/run_tests/report_utils.py index 437c4693a5..0032a98523 100644 --- a/tools/run_tests/report_utils.py +++ b/tools/run_tests/report_utils.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without -- cgit v1.2.3