Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Paolo Bonzini
On 23/03/21 18:27, Vladimir Sementsov-Ogievskiy wrote: Sounds good :) We'll see dots appearing dynamically during test run, yes? Yes, exactly! :) Paolo

Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 20:04, Paolo Bonzini wrote: On 23/03/21 17:56, Vladimir Sementsov-Ogievskiy wrote: hmm, just use a separate call of unittest.main, or honestly define a varaible as Union[] or just Any ? All the ugliness goes away if the implementation is done properly. :) For me normal try-finall

Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Paolo Bonzini
On 23/03/21 17:56, Vladimir Sementsov-Ogievskiy wrote: hmm, just use a separate call of unittest.main, or honestly define a varaible as Union[] or just Any ? All the ugliness goes away if the implementation is done properly. :) For me normal try-finally is a lot more clean than calling atexit(

Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 18:29, Paolo Bonzini wrote: On 23/03/21 15:34, Vladimir Sementsov-Ogievskiy wrote: +    def __init__(self, *args, **kwargs): +    super().__init__(stream=ReproducibleTextTestRunner.output, *args, **kwargs) over-79 line (PEP8) Ok, thanks. + +def execute_unittest(argv, debug=

Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 18:29, Paolo Bonzini wrote: On 23/03/21 15:34, Vladimir Sementsov-Ogievskiy wrote: +    def __init__(self, *args, **kwargs): +    super().__init__(stream=ReproducibleTextTestRunner.output, *args, **kwargs) over-79 line (PEP8) Ok, thanks. + +def execute_unittest(argv, debug=

Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Paolo Bonzini
On 23/03/21 15:34, Vladimir Sementsov-Ogievskiy wrote: +    def __init__(self, *args, **kwargs): +    super().__init__(stream=ReproducibleTextTestRunner.output, *args, **kwargs) over-79 line (PEP8) Ok, thanks. + +def execute_unittest(argv, debug=False): +    """Executes unittests withi

Re: [PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2021 16:06, Paolo Bonzini wrote: Python test scripts that use unittest consist of multiple tests. unittest.main allows selecting which tests to run, but currently this is not possible because the iotests wrapper ignores sys.argv. unittest.main command line options also allow the user to pi

[PATCH 1/4] qemu-iotests: allow passing unittest.main arguments to the test scripts

2021-03-23 Thread Paolo Bonzini
Python test scripts that use unittest consist of multiple tests. unittest.main allows selecting which tests to run, but currently this is not possible because the iotests wrapper ignores sys.argv. unittest.main command line options also allow the user to pick the desired options for verbosity, fai