Created
July 25, 2017 09:58
-
-
Save foreversmart/41a0dfbcbd93b5ccc5b8df19c0825075 to your computer and use it in GitHub Desktop.
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
define deep_test | |
$(eval current = $(subst ...,,$(1))) | |
$(eval files = $(wildcard src/$(current)*/)) | |
$(eval testFiles = $(filter %_test.go, $(files))) | |
$(if $(testFiles),go test $(current)) | |
$(eval packages = $(filter %/, $(files))) | |
$(if $(packages),$(foreach package,$(packages),$(call deep_test,$(subst src/,,$(package))...))) | |
endef |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment