qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 02/10] iotests/297: Add get_files() function


From: John Snow
Subject: Re: [PATCH 02/10] iotests/297: Add get_files() function
Date: Tue, 20 Jul 2021 11:16:05 -0400



On Tue, Jul 6, 2021 at 5:02 AM Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> wrote:
25.06.2021 21:20, John Snow wrote:
> Split out file discovery into its own method to begin separating out the
> "environment setup" and "test execution" phases.
>
> Signed-off-by: John Snow <jsnow@redhat.com>

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

> ---
>   tests/qemu-iotests/297 | 11 +++++++++--
>   1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297
> index 493dda17fb..0bc1195805 100755
> --- a/tests/qemu-iotests/297
> +++ b/tests/qemu-iotests/297
> @@ -21,6 +21,7 @@ import re
>   import shutil
>   import subprocess
>   import sys
> +from typing import List
>   
>   import iotests
>   
> @@ -56,9 +57,15 @@ def is_python_file(filename: str, directory: str = '.') -> bool:
>               return False
>   
>   
> +def get_test_files(directory: str = '.') -> List[str]:
> +    return [
> +        f for f in (set(os.listdir(directory)) - set(SKIP_FILES))
> +        if is_python_file(f, directory)
> +    ]
> +
> +
>   def run_linters():
> -    files = [filename for filename in (set(os.listdir('.')) - set(SKIP_FILES))
> -             if is_python_file(filename)]
> +    files = get_test_files()

Hmm. It looks like files in tests/qemu-iotests/tests are ignored now.. That's bad


Oh, it seems likely we were never checking them -- listdir doesn't recurse before *or* after this patch. OK, I can fix that. It'll be in a new patch.
 
>   
>       iotests.logger.debug('Files to be checked:')
>       iotests.logger.debug(', '.join(sorted(files)))
>


--
Best regards,
Vladimir


reply via email to

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