From 4d0fbd173780e368f4fad84fd585d110f828a01b Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Fri, 13 Jul 2018 16:55:32 -0700 Subject: Add cpp tests under release docker image. 1. Added C++ tests under the release docker image. 2. Cleaned up tests.sh and removed traivis stuff. --- kokoro/linux/cpp_distcheck/build.sh | 14 +++++++++++--- kokoro/linux/pull_request_in_docker.sh | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'kokoro') diff --git a/kokoro/linux/cpp_distcheck/build.sh b/kokoro/linux/cpp_distcheck/build.sh index b8b57e35..89b8379e 100755 --- a/kokoro/linux/cpp_distcheck/build.sh +++ b/kokoro/linux/cpp_distcheck/build.sh @@ -5,7 +5,15 @@ # Change to repo root cd $(dirname $0)/../../.. -# Prepare worker environment to run tests -source kokoro/linux/prepare_build_linux_rc - ./tests.sh cpp_distcheck + +# Run tests under release docker image. +DOCKER_IMAGE_NAME=protobuf/protoc_$(sha1sum protoc-artifacts/Dockerfile | cut -f1 -d " ") +docker pull $DOCKER_IMAGE_NAME + +docker run -v $(pwd):/var/local/protobuf --rm $DOCKER_IMAGE_NAME \ + bash -l /var/local/protobuf/tests.sh cpp || FAILED="true" + +if [ "$FAILED" = "true" ]; then + exit 1 +fi diff --git a/kokoro/linux/pull_request_in_docker.sh b/kokoro/linux/pull_request_in_docker.sh index 38c3d65c..e28ef958 100755 --- a/kokoro/linux/pull_request_in_docker.sh +++ b/kokoro/linux/pull_request_in_docker.sh @@ -5,7 +5,7 @@ WORKSPACE_BASE=`pwd` MY_DIR="$(dirname "$0")" -TEST_SCRIPT=$MY_DIR/../../tests.sh +TEST_SCRIPT=./tests.sh BUILD_DIR=/tmp/protobuf set -e # exit immediately on error -- cgit v1.2.3