Skip to content

Commit bdc5bec

Browse files
committed
Add a "make test-cmd" target
This is a convenience function to allow a user to generate a "go test" command string with the requisite build-specific parameters already filled in. It does not run any code. It is only for allowing the user to forumlate their own go-test session (typically in conjunction with running a specific pkg/test or under a debugger). Change-Id: I3bfe9bfcaf136159b4a447a76a641b6ab0c54ce6 Signed-off-by: Greg Haskins <[email protected]>
1 parent b90f698 commit bdc5bec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
# - peer - builds a native fabric peer binary
2222
# - orderer - builds a native fabric orderer binary
2323
# - unit-test - runs the go-test based unit tests
24+
# - test-cmd - generates a "go test" string suitable for manual customization
2425
# - behave - runs the behave test
2526
# - behave-deps - ensures pre-requisites are availble for running behave manually
2627
# - gotools - installs go tools like golint
@@ -118,6 +119,10 @@ unit-test: peer-docker testenv couchdb
118119

119120
unit-tests: unit-test
120121

122+
# Generates a string to the terminal suitable for manual augmentation / re-issue, useful for running tests by hand
123+
test-cmd:
124+
@echo "go test -ldflags \"$(GO_LDFLAGS)\""
125+
121126
docker: $(patsubst %,build/image/%/$(DUMMY), $(IMAGES))
122127
native: peer orderer
123128

0 commit comments

Comments
 (0)