Makefile: Fix test execution in newly cloned repository
If one clones a repository and directly executes make test
without
building sources manually before, then the tests will fail with an error
when building the prerequisite Nokogiri Ruby gem. The cause of it is
that we cannot clone its repository as the PATH was overridden by the
"test" Makefile target to contain our own "git" scripts in
internal/testhelper/testdata/home/bin
. As they are intended simply to
catch any erroneous invocation of git, they just abort, and so they do
when cloning the Nokogiri gem.
This happens because when one declares variables for a target, then the variable will get inherited to all its subtargets. We may want to fix it by using private variables, which only apply to the current target. But they don't get exported to subshells, and in fact there doesn't seem to be any way to have private exported variables with GNU make.
So let's fix the issue by simply inlining the PATH modification when we execute the tests.