aboutsummaryrefslogtreecommitdiff
path: root/kokoro/linux
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 16:41:25 -0700
commit9de4e64cf2b10f2ef45d811fc1733b4bec8948fa (patch)
tree4b208bad5bc662fa57f41413dd4aa81b92e7b01b /kokoro/linux
parent78944e14035efd2688c70e460e4fee9a0764888d (diff)
downloadprotobuf-9de4e64cf2b10f2ef45d811fc1733b4bec8948fa.tar.gz
protobuf-9de4e64cf2b10f2ef45d811fc1733b4bec8948fa.tar.bz2
protobuf-9de4e64cf2b10f2ef45d811fc1733b4bec8948fa.zip
Add cpp tests under release docker image.
1. Added C++ tests under the release docker image. 2. Fixed a compile issue with the docker image. 3. Cleaned up tests.sh and removed traivis stuff.
Diffstat (limited to 'kokoro/linux')
-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