File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -50,16 +50,27 @@ cd google-api-go-generator
5050go generate
5151cd ..
5252
53+ set +e # Run all tests, don't stop after the first failure.
54+ exit_code=0
55+
5356# Run tests and tee output to log file, to be pushed to GCS as artifact.
5457if [[ $KOKORO_JOB_NAME == * " continuous" * ]]; then
5558 go test -race -v ./... 2>&1 | tee $KOKORO_ARTIFACTS_DIR /$KOKORO_GERRIT_CHANGE_NUMBER .txt
59+ # Takes the kokoro output log (raw stdout) and creates a machine-parseable
60+ # xUnit XML file.
61+ cat $KOKORO_ARTIFACTS_DIR /$KOKORO_GERRIT_CHANGE_NUMBER .txt |
62+ go-junit-report -set-exit-code > sponge_log.xml
63+ exit_code=$( $? )
5664else
5765 go test -race -v -short ./... 2>&1 | tee $KOKORO_ARTIFACTS_DIR /$KOKORO_GERRIT_CHANGE_NUMBER .txt
66+ exit_code=$( $? )
5867fi
5968
6069if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = * " continuous" * ]]; then
61- chmod +x $KOKORO_GFILE_DIR /linux_amd64/flakybot
62- $KOKORO_GFILE_DIR /linux_amd64/flakybot -logs_dir=$GOCLOUD_HOME \
63- -repo=googleapis/google-api-go-client \
64- -commit_hash=$KOKORO_GITHUB_COMMIT_URL_google_api_go_client
70+ chmod +x $KOKORO_GFILE_DIR /linux_amd64/flakybot
71+ $KOKORO_GFILE_DIR /linux_amd64/flakybot -logs_dir=$GOCLOUD_HOME \
72+ -repo=googleapis/google-api-go-client \
73+ -commit_hash=$KOKORO_GITHUB_COMMIT_URL_google_api_go_client
6574fi
75+
76+ exit $exit_code
You can’t perform that action at this time.
0 commit comments