-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
让 CI 中的报错信息更直观 #646
Comments
复现步骤: 提交个会让 ut 报错的 pr,github 跑 CI 会报错,但报错信息如上图、不明显,看不出来是哪个ut出错了 |
It seems still not solve, and nobody take this task. In layotto github-ci process, main command about go-unit-test is .PHONY: go.test
OUTPUT := /home/alilestera/foo.txt
go.unittest:
@echo "===========> Run unit test in diagnostics" > $(OUTPUT) && \
$(GO) test -count=1 -timeout=10m -short -v `go list ./diagnostics/...` >> $(OUTPUT) && \
echo "===========> Run unit test in sdk/go-sdk" >> $(OUTPUT) && \
cd sdk/go-sdk && $(GO) test -count=1 -timeout=10m -short -v `go list ./... | grep -v runtime` >> $(OUTPUT) && \
echo "===========> Run unit test in components" >> $(OUTPUT) && \
cd ../../components/ && $(GO) test -count=1 -timeout=10m -short -v `go list ./...` >> $(OUTPUT) && \
echo "===========> Run unit test in pkg" >> $(OUTPUT) && \
cd ../ && $(GO) test -count=1 -timeout=10m -short -v `go list ./pkg/...` >> $(OUTPUT) || true
go.test: go.unittest
@cat $(OUTPUT)
# if failed, exit 1 to stop process
@if grep -q "FAIL" $(OUTPUT); then \
grep "FAIL" $(OUTPUT); \
rm -f $(OUTPUT); \
exit 1; \
fi;
@rm -f $(OUTPUT) Use |
优化检查报错信息,让报错更明显些
The text was updated successfully, but these errors were encountered: