[Top][All Lists]

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

Re: [Qemu-block] [Qemu-devel] [PATCH v4 1/4] iotests: add script_initial

From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v4 1/4] iotests: add script_initialize
Date: Mon, 16 Sep 2019 14:56:40 +0000

12.09.2019 3:16, John Snow wrote:
> Like script_main, but doesn't require a single point of entry.
> Replace all existing initialization sections with this drop-in replacement.
> This brings debug support to all existing script-style iotests.
> Note: supported_oses=['linux'] was omitted, as it is a default argument.

But after this patch all test which didn't check os start to check linux
(as it's default).. So all tests which worked on other platforms will now
be skipped on these other platforms?

Finally do we support something except linux for iotests?
for bash tests _supported_os also used only with "Linux" in 87 tests..

May be we'd better drop both _supported_os and supported_oses alltogether,
and don't care?

Anyway, if we support only linux, any reason to skip almost all tests,
if someone tries to run test on other platform? Let him run what he wants.

> Signed-off-by: John Snow <address@hidden>
> ---


> +def execute_test(test_function=None, *args, **kwargs):
> +    """Run either unittest or script-style tests."""
> +
> +    debug = execute_setup_common(*args, **kwargs)
>       if not test_function:
> -        execute_unittest(output, verbosity, debug)
> +        execute_unittest(debug)
>       else:
>           test_function()
> +# This is called from script-style iotests without a single point of entry
> +def script_initialize(*args, **kwargs):
> +    """Initialize script-style tests without running any tests."""
> +    execute_setup_common(*args, **kwargs)
> +
> +# This is called from script-style iotests with a single point of entry
>   def script_main(test_function, *args, **kwargs):
>       """Run script-style tests outside of the unittest framework"""
>       execute_test(test_function, *args, **kwargs)
> +# This is called from unittest style iotests
>   def main(*args, **kwargs):
>       """Run tests using the unittest framework"""

Hmm, now two different styles of code documenting used: comment and doc-string,
both containing almost equal meaning.. I don't like it, still don't really mind.

>       execute_test(None, *args, **kwargs)

Best regards,

reply via email to

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