-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add contrib/subtree
test execution to CI builds
#3349
Conversation
test: $(GIT_SUBTREE_TEST) | ||
$(MAKE) -C t/ test | ||
$(MAKE) -C t/ all | ||
|
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.
Is this just a bug in the existing makefile? Did make -C contrib/subtree test
just not work before?
This might be a good one-liner to send upstream, even if we don't choose to do the rest of the change. I would split them into two commits, first this change, then the changes to ci/
.
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.
I think the idea here is that all
defaults to running DEFAULT_TEST_TARGET
, which is set to prove
in the CI runs. And test
is a different target.
An alternative I briefly considered was to call make
twice: once to "build" git-subtree
, and then the test run. But that would be rather ugly because the tests require the git-subtree
file to be copied to ../..
, which the test
target does, thanks to the prerequisite $(GIT_SUBTREE_TEST)
.
In short: I concur with @derrickstolee that it would be best to split out the change to the Makefile
, and the commit message should probably mention that we're aligning with how Git's top-level Makefile
defines its own test
target (it also calls $(MAKE) -C t/ all
, and then also mention that we want to be able to call this make
target in contrib/subtree
in the CI runs, where DEFAULT_TEST_TARGET
is defined as prove
.
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.
it would be best to split out the change to the
Makefile
Sounds good! Depending on whether you'd like me to make the change or not, should changing the use of pre-clean
be part of the same commit, or a separate one?
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.
It can definitely be not only a separate commit, but an independent patch series. And nothing about that patch series would be urgent: since we lost Azure Pipelines' powerful analysis/statistics/UI for tests (see e.g. here), we do not actually care about the full test results to be maintained. We are only interested in them if anything fails. And since we only run the subtree
tests if Git's own test suite passed, that desire is still addressed.
However, should we ever decide to always run the subtree
tests (even if Git's test suite failed, in which we obviously would still want to fail the test, i.e. record the exit status indicating failure in some way), we would definitely need to get rid of the automatic pre-clean
dependency.
For now, though, there is no point in holding this PR up, I think. It would be good to have it in -rc2
(I would probably reorder the pick
s and the merge
somewhat, so that the Merge 'readme'
commit still comes on top).
@vdye could you please also describe in the commit message that we are so interested in |
Oh, and I think there is yet another snag: I am not sure that I like the sound of this. Granted, we currently call |
I wanted to avoid making changes that caused
If we did remove the |
The intention of this change is to align with how the top-level git `Makefile` defines its own test target (which also internally calls `$(MAKE) -C t/ all`). This change also ensures the consistency of `make -C contrib/subtree test` with other testing in CI executions (which rely on `$DEFAULT_TEST_TARGET` being defined as `prove`). Signed-off-by: Victoria Dye <[email protected]>
Because `git subtree` (unlike most other `contrib` modules) is included as part of the standard release of Git for Windows, its stability should be verified as consistently as it is for the rest of git. By including the `git subtree` tests in the CI workflow, these tests are as much of a gate to merging and indicator of stability as the standard test suite. Signed-off-by: Victoria Dye <[email protected]>
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.
All my outstanding suggestions can definitely wait for their own patch series in the future. This is good to go!
Add `contrib/subtree` test execution to CI builds
That makes sense, I just have a hunch that upstream might be amenable to adjust this so that
My favorite solution would be to keep it as a stand-alone target, but remove it as a dependency from all other rules. The point being: if you want to run the tests as part of CI, chances are that you already ran Git's own CI and want to preserve the test results. But as I said, this can wait for another time. |
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
…tests Add `contrib/subtree` test execution to CI builds
…tests Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
Add `contrib/subtree` test execution to CI builds
…tests Add `contrib/subtree` test execution to CI builds
…tests Add `contrib/subtree` test execution to CI builds
Changes
make test
passes in Windows, Linux, and Mac build/test jobsmake test
more than once inrun-build-and-tests.sh
, subtree tests are only run after the last execution ofmake test
exit 1
torun-build-and-tests.sh
- otherwise, tests failing inmake test
wouldn't always fail the test execution (this might also be because I'm not great at bash scripting 😉)contrib/subtree
test
target updated to invoket/
directoryall
target (rather thantest
target)$DEFAULT_TEST_TARGET
test
target behaviorTesting
git subtree
testsgit subtree
tests executed only aftermake test
passes