pull_request_in_docker.sh 647 Bytes
Newer Older
1 2 3 4 5 6 7
#!/bin/bash
#
# This is the script that runs inside Docker, once the image has been built,
# to execute all tests for the "pull request" project.

WORKSPACE_BASE=`pwd`
MY_DIR="$(dirname "$0")"
8
TEST_SCRIPT=./tests.sh
9 10 11 12 13 14 15 16 17 18
BUILD_DIR=/tmp/protobuf

set -e  # exit immediately on error
set -x  # display all commands

# The protobuf repository is mounted into our Docker image, but read-only.
# We clone into a directory inside Docker (this is faster than cp).
rm -rf $BUILD_DIR
mkdir -p $BUILD_DIR
cd $BUILD_DIR
19
git clone /var/local/kokoro/protobuf
20 21
cd protobuf

22 23 24
# Initialize any submodules:
git submodule update --init --recursive

Feng Xiao's avatar
Feng Xiao committed
25
$TEST_SCRIPT $TEST_SET