aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2018-07-13 09:54:43 -0700
committerGitHub <noreply@github.com>2018-07-13 09:54:43 -0700
commit1ccb8d4b39a2f5b49ab0f168ab734c7b496ed718 (patch)
tree173c5299ecbbf9c082d883ba6bd2bb19481234a7
parentf21d4d6830a935da99c9aa107827c1d827768121 (diff)
parent517190a7d9997ff849b4caf265d1323a825d607f (diff)
downloadprotobuf-1ccb8d4b39a2f5b49ab0f168ab734c7b496ed718.tar.gz
protobuf-1ccb8d4b39a2f5b49ab0f168ab734c7b496ed718.tar.bz2
protobuf-1ccb8d4b39a2f5b49ab0f168ab734c7b496ed718.zip
Merge pull request #4905 from BSBandme/fix_kokoro_build_in_docker
fix linux kokoro build in docker
-rw-r--r--examples/list_people_test.go2
-rwxr-xr-xkokoro/linux/build_and_run_docker.sh2
-rwxr-xr-xkokoro/linux/pull_request_in_docker.sh6
-rw-r--r--python/tox.ini3
4 files changed, 10 insertions, 3 deletions
diff --git a/examples/list_people_test.go b/examples/list_people_test.go
index 87d6ad6e..887997fe 100644
--- a/examples/list_people_test.go
+++ b/examples/list_people_test.go
@@ -34,7 +34,7 @@ func TestWritePersonWritesPerson(t *testing.T) {
func TestListPeopleWritesList(t *testing.T) {
buf := new(bytes.Buffer)
- in := pb.AddressBook{[]*pb.Person{
+ in := pb.AddressBook{People: []*pb.Person {
{
Name: "John Doe",
Id: 101,
diff --git a/kokoro/linux/build_and_run_docker.sh b/kokoro/linux/build_and_run_docker.sh
index 6a1f327a..f9c60710 100755
--- a/kokoro/linux/build_and_run_docker.sh
+++ b/kokoro/linux/build_and_run_docker.sh
@@ -35,6 +35,8 @@ echo $git_root
docker run \
"$@" \
-e CCACHE_DIR=$CCACHE_DIR \
+ -e KOKORO_BUILD_NUMBER=$KOKORO_BUILD_NUMBER \
+ -e KOKORO_BUILD_ID=$KOKORO_BUILD_ID \
-e EXTERNAL_GIT_ROOT="/var/local/kokoro/protobuf" \
-e TEST_SET="$TEST_SET" \
-e THIS_IS_REALLY_NEEDED='see https://github.com/docker/docker/issues/14203 for why docker is awful' \
diff --git a/kokoro/linux/pull_request_in_docker.sh b/kokoro/linux/pull_request_in_docker.sh
index df3636cc..38c3d65c 100755
--- a/kokoro/linux/pull_request_in_docker.sh
+++ b/kokoro/linux/pull_request_in_docker.sh
@@ -53,7 +53,7 @@ $TIME_CMD $TEST_SCRIPT cpp > >(tee $CPP_STDOUT) 2> >(tee $CPP_STDERR >&2)
parallel --results $LOG_OUTPUT_DIR --joblog $OUTPUT_DIR/joblog $TEST_SCRIPT ::: \
$TEST_SET \
- || true # Process test results even if tests fail.
+ || FAILED="true" # Process test results even if tests fail.
cat $OUTPUT_DIR/joblog
@@ -67,3 +67,7 @@ TESTOUTPUT_XML_FILE=$COPY_FROM_DOCKER/sponge_log.xml
python $MY_DIR/make_test_output.py $OUTPUT_DIR > $TESTOUTPUT_XML_FILE
ls -l $TESTOUTPUT_XML_FILE
+
+if [ "$FAILED" == "true" ]; then
+ exit 1
+fi
diff --git a/python/tox.ini b/python/tox.ini
index 38a81b4f..4eb319d2 100644
--- a/python/tox.ini
+++ b/python/tox.ini
@@ -4,7 +4,8 @@ envlist =
[testenv]
usedevelop=true
-passenv = CC
+passenv =
+ CC KOKORO_BUILD_ID KOKORO_BUILD_NUMBER
setenv =
cpp: LD_LIBRARY_PATH={toxinidir}/../src/.libs
cpp: DYLD_LIBRARY_PATH={toxinidir}/../src/.libs