aboutsummaryrefslogtreecommitdiff
path: root/kokoro
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2018-07-13 16:55:32 -0700
committerFeng Xiao <xfxyjwf@gmail.com>2018-07-15 21:03:55 -0700
commit4d0fbd173780e368f4fad84fd585d110f828a01b (patch)
treeb1096f472114432827b050b1ca43b8380a57e4f9 /kokoro
parent474fd3160f6ef0daa7ad75941d203dfb34bcf3e5 (diff)
downloadprotobuf-4d0fbd173780e368f4fad84fd585d110f828a01b.tar.gz
protobuf-4d0fbd173780e368f4fad84fd585d110f828a01b.tar.bz2
protobuf-4d0fbd173780e368f4fad84fd585d110f828a01b.zip
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.
Diffstat (limited to 'kokoro')
-rwxr-xr-xkokoro/linux/cpp_distcheck/build.sh14
-rwxr-xr-xkokoro/linux/pull_request_in_docker.sh2
2 files changed, 12 insertions, 4 deletions
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