build.sh 461 B

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