aboutsummaryrefslogtreecommitdiff
path: root/kokoro/linux/cpp_distcheck/build.sh
blob: 89b8379ed0cddb0c02ce0b4e8a17ffb24ceba5a8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
#
# Build file to set up and run tests

# Change to repo root
cd $(dirname $0)/../../..

./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