]> git.ipfire.org Git - thirdparty/git.git/commit
t: do not pass GIT_TEST_OPTS to unit tests with prove
authorPatrick Steinhardt <ps@pks.im>
Wed, 4 Sep 2024 14:16:46 +0000 (16:16 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 4 Sep 2024 15:41:36 +0000 (08:41 -0700)
commit71360809ec218ebb58a092f61efbd215fe1d364b
tree13bc7c5eec4b212c12c6e1f365e0f3ca9f6b0b80
parentbb9c16bd4f1a9a00799e10c81ee6506cf468c0c7
t: do not pass GIT_TEST_OPTS to unit tests with prove

When using the prove target, we append GIT_TEST_OPTS to the arguments
that we execute each of the tests with. This doesn't only include the
intended test scripts, but also ends up passing the arguments to our
unit tests. This is unintentional though as they do not even know to
interpret those arguments, and is inconsistent with how we execute unit
tests without prove.

This isn't much of an issue because our current set of unit tests mostly
ignore their arguments anyway. With the introduction of clar-based unit
tests this is about to become an issue though, as these do parse their
command line argument to alter behaviour.

Prepare for this by passing GIT_TEST_OPTS to "run-test.sh" via an
environment variable. Like this, we can conditionally forward it to our
test scripts, only.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/Makefile
t/run-test.sh