-
Notifications
You must be signed in to change notification settings - Fork 636
make+Makefile: Introduce unit test variants #1047
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
base: master
Are you sure you want to change the base?
make+Makefile: Introduce unit test variants #1047
Conversation
05cb26e
to
91685be
Compare
91685be
to
046c335
Compare
@@ -44,12 +44,18 @@ ifeq ($(UNIT_TARGETED), yes) | |||
UNIT := $(GOTEST) $(TEST_FLAGS) $(UNITPKG) | |||
UNIT_DEBUG := $(GOTEST) -v $(TEST_FLAGS) $(UNITPKG) | |||
UNIT_RACE := $(GOTEST) $(TEST_FLAGS) -race $(UNITPKG) | |||
# NONE is a special value which selects no other tests but only executes the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: a newline above
endif | ||
|
||
ifeq ($(UNIT_TARGETED), no) | ||
UNIT := $(GOLIST) | $(XARGS) env $(GOTEST) $(TEST_FLAGS) | ||
UNIT_DEBUG := $(GOLIST) | $(XARGS) env $(GOTEST) -v $(TEST_FLAGS) | ||
UNIT_RACE := $(UNIT) -race | ||
# NONE is a special value which selects no other tests but only executes the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: a newline above
env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(UNIT_RACE) | ||
|
||
#? unit-debug: Run unit tests with verbose debug output enabled | ||
unit-debug: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm looks like this doesn't print the debug logs,
make unit-debug log="stdlog debug" pkg=wallet case=TestLocateBirthdayBlock timeout=10s
Change Description
Towards #1041.
Towards #1015.
Motivation and Context
Motivated by @yyforyongyu's comment #1044 (comment)
Steps to Test
Steps for reviewers to follow to test the change.
Pull Request Checklist
Testing
Code Style and Documentation
📝 Please see our Contribution Guidelines for further guidance.