Control: tags -1 + patch On Wed, 18 Aug 2021 at 12:29:19 +0200, Gianfranco Costamagna wrote: > Hello, looks some autopkgtest is failing with new version > https://ci.debian.net/data/autopkgtest/testing/amd64/a/automake-1.16/14607120/log.gz > > FAIL: t/python-prefix.sh
>From the test-suite.log that is captured in the AUTOPKGTEST_ARTIFACTS: > FAIL: t/python-prefix > ===================== > > python-prefix: running python3 -V > Python 3.9.7 > Running from installcheck: no > Test Protocol: none > PATH = > /tmp/autopkgtest-lxc.cosyvbaj/downtmp/build.xbM/src/bin:/tmp/autopkgtest-lxc.cosyvbaj/downtmp/build.xbM/src/t/ax:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games > ++ pwd > /tmp/autopkgtest-lxc.cosyvbaj/downtmp/build.xbM/src/t/python-prefix.dir > + cat > + cat > ++ python -c 'import sys; print("%u.%u" % sys.version_info[:2])' > ./t/python-prefix.sh: line 48: python: command not found > + py_version= > + am_exit_trap 127 > + exit_status=127 > + set +e > + cd /tmp/autopkgtest-lxc.cosyvbaj/downtmp/build.xbM/src > + test none = tap > + case $am_explicit_skips in > + test 127 -eq 0 > + keep_testdirs=yes > + am_keeping_testdirs > + case $keep_testdirs in > + return 0 > + set +x > FAIL t/python-prefix.sh (exit status: 127) The attached patch should resolve this. smcv
From: Simon McVittie <s...@debian.org> Date: Mon, 6 Sep 2021 11:11:32 +0100 Subject: t/python-prefix.sh: Respect PYTHON environment variable Otherwise, this test will fail on operating systems that have python3 but not python (implicitly Python 2) in the PATH. The test initialization in t/ax/*.sh sets PYTHON whenever we have required=python, so we can assume it is set, and do not need to fall back to calling python if it is unset. Bug-Debian: https://bugs.debian.org/992416 Signed-off-by: Simon McVittie <s...@debian.org> --- t/python-prefix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/python-prefix.sh b/t/python-prefix.sh index 3179d42..5c70d96 100755 --- a/t/python-prefix.sh +++ b/t/python-prefix.sh @@ -45,7 +45,7 @@ echo-python-exec-prefix: @echo $(PYTHON_EXEC_PREFIX) END -py_version=$(python -c 'import sys; print("%u.%u" % sys.version_info[:2])') +py_version=$($PYTHON -c 'import sys; print("%u.%u" % sys.version_info[:2])') py_inst_site=inst/lib/python$py_version/site-packages py_instexec_site=instexec/lib/python$py_version/site-packages