]> git.ipfire.org Git - thirdparty/git.git/commit
t: fix out-of-tree tests for some git-p4 tests
authorPatrick Steinhardt <ps@pks.im>
Fri, 13 Dec 2024 10:41:21 +0000 (11:41 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Dec 2024 14:48:47 +0000 (06:48 -0800)
commit78ad7291df6185df54d86908bd268bfeffe0c13d
tree835ca671a723746a83f4d8646fbd606120e25dbb
parent154ce05cce0ae23581fa79fe988521a2d91df134
t: fix out-of-tree tests for some git-p4 tests

Both t9835 and t9836 exercise git-p4, but one exercises Python 2 whereas
the other one uses Python 3. These tests do not exercise "git p4", but
instead they use "git p4.py". This calls the unbuilt version of
"git-p4.py" that still has the "#!/usr/bin/env python" shebang, which
allows the test to modify which Python version comes first in $PATH,
making it possible to force a Python version.

But "git-p4.py" is not in our PATH during out-of-tree builds, and thus
we cannot locate "git-p4.py". The tests thus break with CMake and Meson.

Fix this by instead manually setting up script wrappers that invoke the
respective Python interpreter directly.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9835-git-p4-metadata-encoding-python2.sh
t/t9836-git-p4-metadata-encoding-python3.sh