Skip to content
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

How to break test when go test FAIL? #1670

Closed
thinkerou opened this issue Nov 27, 2018 · 1 comment · Fixed by #1671
Closed

How to break test when go test FAIL? #1670

thinkerou opened this issue Nov 27, 2018 · 1 comment · Fixed by #1671
Assignees
Milestone

Comments

@thinkerou
Copy link
Member

thinkerou commented Nov 27, 2018

ref #1656

Now run make test script:

test:
	echo "mode: count" > coverage.out
	for d in $(TESTFOLDER); do \
		$(GO) test -v -covermode=count -coverprofile=profile.out $$d; \
		if [ -f profile.out ]; then \
			cat profile.out | grep -v "mode:" >> coverage.out; \
			rm profile.out; \
		fi; \
	done

If use $(GO) test -v -covermode=count -coverprofile=profile.out $$d; | grep "^--- FAIL" | exit 1;, it can output log to console.

So, how should we?

@thinkerou thinkerou self-assigned this Nov 27, 2018
@thinkerou thinkerou added this to the 1.4 milestone Nov 27, 2018
@thinkerou
Copy link
Member Author

please see #1671

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant