[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 02/67] iotests.py: Add @skip_for_imgopts()
From: |
Max Reitz |
Subject: |
Re: [PATCH 02/67] iotests.py: Add @skip_for_imgopts() |
Date: |
Fri, 4 Oct 2019 14:55:18 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0 |
On 03.10.19 17:19, Vladimir Sementsov-Ogievskiy wrote:
> 01.10.2019 22:46, Max Reitz wrote:
>> Signed-off-by: Max Reitz <address@hidden>
>> ---
>> tests/qemu-iotests/iotests.py | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
>> index 7030900807..cdcb62c4ac 100644
>> --- a/tests/qemu-iotests/iotests.py
>> +++ b/tests/qemu-iotests/iotests.py
>> @@ -950,6 +950,19 @@ def skip_if_unsupported(required_formats=[],
>> read_only=False):
>> return func_wrapper
>> return skip_test_decorator
>>
>> +def skip_for_imgopts(unsupported_opts=[]):
>> + '''Skip Test Decorator
>> + Skips the test if imgopts contains any of the given options'''
>> + def skip_test_decorator(func):
>> + def func_wrapper(test_case: QMPTestCase, *args, **kwargs):
>
> how about
>
> unsup = set(imgopts) & set(unsupported_opts)
> if unsup:
> test_case.case_skip('... Options {} are ...', format(..., ',
> '.join(map(str, unsup)))
Sure.
Max
signature.asc
Description: OpenPGP digital signature