Skip to content

chore: fix piped test errors being suppressed - #1396

Merged
enocom merged 2 commits into
mainfrom
convert-xml
Sep 13, 2022
Merged

chore: fix piped test errors being suppressed#1396
enocom merged 2 commits into
mainfrom
convert-xml

Conversation

@jackwotherspoon

Copy link
Copy Markdown
Collaborator

By explicitly configuring shell: bash in test step it enables set -eo pipefail (documentation) which means errors in left side of pipe will no longer be suppressed by the success of the right side of the pipe.

go test -race -v ./... | tee test_results.txt

Additionally, with new pipefail being set, if line that runs the test go test -race -v ./... | tee test_results.txt fails (i.e. a test fails) than this causes an exit code and for the line below it go-junit-report ... not to be run which in turn disables flakybot from working as it requires XML sponge log.

By moving the convert XML functionality to its own step in the workflow we can make sure it always runs no matter what happens with the tests.

@jackwotherspoon
jackwotherspoon requested a review from a team September 8, 2022 20:39
@jackwotherspoon jackwotherspoon self-assigned this Sep 8, 2022
@enocom

enocom commented Sep 8, 2022

Copy link
Copy Markdown
Member

This will fail until #1390 is fixed.

@enocom
enocom merged commit 1b8d2ac into main Sep 13, 2022
@enocom
enocom deleted the convert-xml branch September 13, 2022 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants