1#!/bin/bash 2# 3# Build file to set up and run tests 4 5set -ex # exit immediately on error 6 7# Change to repo root 8cd $(dirname $0)/../../.. 9 10./tests.sh cpp_distcheck 11 12# Run tests under release docker image. 13DOCKER_IMAGE_NAME=protobuf/protoc_$(sha1sum protoc-artifacts/Dockerfile | cut -f1 -d " ") 14docker pull $DOCKER_IMAGE_NAME 15 16docker run -v $(pwd):/var/local/protobuf --rm $DOCKER_IMAGE_NAME \ 17 bash -l /var/local/protobuf/tests.sh cpp || FAILED="true" 18 19if [ "$FAILED" = "true" ]; then 20 exit 1 21fi 22