Makefile: build default goal before running tests

We add the default Makefile goal, namely, the local "git-lfs" binary
in our "bin/" directory, as a dependency for the "make test" target.
This ensures the local binary has been created and is up-to-date
before the Go tests run.

Otherwise, when running "make test" in a fresh clone or where the
local binary does not yet exist for some other reason, the test suite
will invoke whatever other "git-lfs" binary exists on the system rather
than one local to the working tree, despite the adjustment of the
PATH environment variable added in commit 6f6b353c25b7.
This commit is contained in:
Chris Darroch 2020-03-27 19:46:40 -07:00
parent 6f6b353c25
commit 0f2cccb481

@ -404,7 +404,7 @@ test-race : GO_TEST_EXTRA_ARGS=-race
# make PKGS="config lfsapi tools/kv" test-race
#
# And so on.
test : fmt
test : fmt $(.DEFAULT_GOAL)
(unset GIT_DIR; unset GIT_WORK_TREE; \
$(GO) test -count=1 $(GO_TEST_EXTRA_ARGS) $(addprefix ./,$(PKGS)))