Commit bd0b557
committed
t4080: skip when no python interpreter is available at runtime
`t4080-diff-process.sh` invented its own way of locating a python
interpreter (a runtime `command -v python3 || command -v python`
lookup that overrode the build-time `PYTHON_PATH`), and gated the
test only on the build-time `PYTHON` prereq. That paradigm differs
from how the existing python-using tests in `lib-git-p4.sh` handle
the same question, which combines the `PYTHON` build-time prereq
with the build-time `$PYTHON_PATH` directly. The mismatch is
unnecessary and surprising: it duplicates intent, ignores the
configured interpreter the rest of the suite agrees on, and still
fails in the most relevant case.
That most relevant case is environments where Git was configured
with Python support (so `PYTHON` is on) but no python interpreter
exists on the runtime PATH, such as the minimal Git for Windows
SDK where Perl pulls the Python bindings into the build but no
interpreter is installed. There t4080 would wire the diff backend
to an empty or unresolvable interpreter, and every subsequent test
would fail on the first backend invocation with a misleading error.
Align t4080 with `lib-git-p4.sh`: rely on the `PYTHON` prereq for
the build-time signal, additionally verify that the configured
`$PYTHON_PATH` is actually executable at runtime, and announce a
single `skip_all` when either condition fails. The bespoke
`command -v` shimmery is no longer needed.
Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>1 parent ac66243 commit bd0b557
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
0 commit comments