pull_request_in_docker.sh 647 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. #
  3. # This is the script that runs inside Docker, once the image has been built,
  4. # to execute all tests for the "pull request" project.
  5. WORKSPACE_BASE=`pwd`
  6. MY_DIR="$(dirname "$0")"
  7. TEST_SCRIPT=./tests.sh
  8. BUILD_DIR=/tmp/protobuf
  9. set -e # exit immediately on error
  10. set -x # display all commands
  11. # The protobuf repository is mounted into our Docker image, but read-only.
  12. # We clone into a directory inside Docker (this is faster than cp).
  13. rm -rf $BUILD_DIR
  14. mkdir -p $BUILD_DIR
  15. cd $BUILD_DIR
  16. git clone /var/local/kokoro/protobuf
  17. cd protobuf
  18. # Initialize any submodules:
  19. git submodule update --init --recursive
  20. $TEST_SCRIPT $TEST_SET