Created
October 25, 2018 22:37
-
-
Save Azadehkhojandi/64683cdc6e72618870dc101499c6c312 to your computer and use it in GitHub Desktop.
running go tests and export the results for azure devops
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "get the go-junit-report package" | |
go get -u github.com/jstemmer/go-junit-report | |
echo "run the tests" | |
go test -v ./tests 2>&1 > go-test-result && exitCode=$? || exitCode=$? | |
echo "Write the result.xml file" | |
cat go-test-result | $(GOBIN)/go-junit-report > report.xml | |
echo "result: $exitCode" | |
exit $exitCode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment