[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: Require Python 3.5 or lat
Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: Require Python 3.5 or later
Wed, 18 Sep 2019 13:20:35 +0200
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0
On 9/18/19 11:29 AM, Kevin Wolf wrote:
> Am 18.09.2019 um 11:20 hat Max Reitz geschrieben:
>> On 18.09.19 10:55, Kevin Wolf wrote:
>>> Running iotests is not required to build QEMU, so we can have stricter
>>> version requirements for Python here and can make use of new features
>>> and drop compatibility code earlier.
>>> This makes qemu-iotests skip all Python tests if a Python version before
>>> 3.5 is used for the build.
>>> Suggested-by: Eduardo Habkost <address@hidden>
>>> Signed-off-by: Kevin Wolf <address@hidden>
>>> tests/qemu-iotests/check | 14 +++++++++++++-
>>> 1 file changed, 13 insertions(+), 1 deletion(-)
>>> diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
>>> index 875399d79f..a68f414d6c 100755
>>> --- a/tests/qemu-iotests/check
>>> +++ b/tests/qemu-iotests/check
>>> @@ -633,6 +633,13 @@ then
>>> export SOCKET_SCM_HELPER="$build_iotests/socket_scm_helper"
>>> +# Note that if the Python conditional here evaluates True we will exit
>>> +# with status 1 which is a shell 'false' value.
>> I’d expect everything to exit with 1 if something does not work. Thus,
>> I find the short script confusing (I think you do, too, or you wouldn’t
>> have written this comment). Why not make it “sys.exit(0 if
>> sys.version_info >= (3, 5) else 1)”?
Good suggestion :)
> I just copied it from configure, actually. :-)
> But we can use your way, too. I don't really mind.
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>