qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 9/9] iotests: use tests/venv for running tests


From: John Snow
Subject: Re: [RFC PATCH 9/9] iotests: use tests/venv for running tests
Date: Fri, 13 May 2022 12:00:30 -0400



On Fri, May 13, 2022, 11:33 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
On 5/13/22 16:38, John Snow wrote:
> It *should*, because "#!/usr/bin/env python3" is the preferred shebang
> for Python scripts.
>
> https://peps.python.org/pep-0394/ <https://peps.python.org/pep-0394/>
>
> 'python3' "should" be available. 'python' may not be.
>
> Probably the "python" name in Makefile for TESTS_PYTHON should actually
> be "python3" as well. In practice, all permutations (python, python3,
> python3.9, etc.) are symlinks* to the binary used to create the venv.
> Which links are present may be site configurable, but pep394 should
> guarantee that python3 is always available.

IIRC we have some cases (FreeBSD?) where only the python3.x executable
is available.  This is why we 1) default to Meson's Python 3 if neither
--meson nor --python are passed, and 2) use the shebang you mention but
with *non-executable* files, which Meson treats magically as "invoke
with the Python interpreter that was used to launch me".

This tidbit is particularly 😥


Paolo

FreeBSD, why do you insist on hurting me?

(I'm surprised - python3 is *supposed* to be defined. Isn't this supremely annoying for FreeBSD users to have every last Python shebang script not work?)

OK. I'll test, and possibly update avocado's existing makefile magic if necessary. It may be the case that the venv just works anyway. No way to know but to test, I guess.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]