[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions |
Date: |
Wed, 7 Nov 2018 10:49:10 -0200 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
On Wed, Nov 07, 2018 at 07:05:03AM +0100, Markus Armbruster wrote:
> Eduardo Habkost <address@hidden> writes:
>
> > The $(SHELLSTATUS) variable requires GNU make >= 4.2, but Travis
> > seems to provide an older version. Change the existing rules to
> > use command output instead of exit code, to make it compatible
> > with older GNU make versions.
> >
> > Signed-off-by: Eduardo Habkost <address@hidden>
> > ---
> > I think that's the cause of the Travis failures. I have
> > submitted a test job right now, at:
> > https://travis-ci.org/ehabkost/qemu-hacks/jobs/451387962
> > Let's see if it fixes the issue.
> > ---
> > tests/Makefile.include | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tests/Makefile.include b/tests/Makefile.include
> > index d2e577eabb..074eece558 100644
> > --- a/tests/Makefile.include
> > +++ b/tests/Makefile.include
> > @@ -913,8 +913,8 @@ TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results
> > # information please refer to "avocado --help".
> > AVOCADO_SHOW=none
> >
> > -$(shell $(PYTHON) -c 'import sys; assert sys.version_info >= (3,0)'
> > >/dev/null 2>&1)
> > -ifeq ($(.SHELLSTATUS),0)
> > +PYTHON3 = $(shell $(PYTHON) -c 'import sys; print(1 if sys.version_info >=
> > (3, 0) else 0)')
> > +ifeq ($(PYTHON3), 1)
> > $(TESTS_VENV_DIR): $(TESTS_VENV_REQ)
> > $(call quiet-command, \
> > $(PYTHON) -m venv --system-site-packages $@, \
>
> PEP 394 recommends software distributions install Python 3 into the
> default path as python3, and users use that instead of python, except
> for programs that are source compatible with both 2 and 3. So, is
> finding out whether python is a Python 3 really appropriate? Why can't
> we just use python3 and be done with it?
Because './configure --with-python=...' exists, and I didn't want
to break it.
Now, why do we need --with-python, and why do we need to use
$(PYTHON) when running tests? If somebody wants to use a
different Python binary when running tests, they can already use
$PATH for that.
(That's the same argument I used for iotests a while ago:
https://www.mail-archive.com/address@hidden/msg566631.html)
>
> If we can't: isn't this a configure problem?
It is, and I think Cleber mentioned that he planned to do it in
./configure, a while ago. But just using the python3 binary from
$PATH would be even better.
--
Eduardo
- Re: [Qemu-block] [PULL 11/15] Bootstrap Python venv for tests, Peter Maydell, 2018/11/06
- Re: [Qemu-block] [Qemu-devel] [PULL 11/15] Bootstrap Python venv for tests, Philippe Mathieu-Daudé, 2018/11/06
- [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions, Eduardo Habkost, 2018/11/06
- Re: [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions, Peter Maydell, 2018/11/06
- Re: [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions, Markus Armbruster, 2018/11/07
- Re: [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions, Peter Maydell, 2018/11/07
- Re: [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions,
Eduardo Habkost <=
- Re: [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions, Peter Maydell, 2018/11/07
- Re: [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions, Eduardo Habkost, 2018/11/07
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Fix Python 3 detection on older GNU make versions, Markus Armbruster, 2018/11/07
- Re: [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions, Cleber Rosa, 2018/11/07
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Fix Python 3 detection on older GNU make versions, Markus Armbruster, 2018/11/08
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Fix Python 3 detection on older GNU make versions, Philippe Mathieu-Daudé, 2018/11/08
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Fix Python 3 detection on older GNU make versions, Markus Armbruster, 2018/11/08
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Fix Python 3 detection on older GNU make versions, Max Reitz, 2018/11/09
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Fix Python 3 detection on older GNU make versions, Markus Armbruster, 2018/11/12
- Re: [Qemu-block] [Qemu-devel] [PATCH] tests: Fix Python 3 detection on older GNU make versions, Cleber Rosa, 2018/11/08