diff mbox series

[4/4] iotests/297: Cover tests/

Message ID 20210329132632.68901-5-mreitz@redhat.com (mailing list archive)
State New, archived
Headers show
Series iotests/297: Cover tests/ | expand

Commit Message

Max Reitz March 29, 2021, 1:26 p.m. UTC
297 so far does not check the named tests, which reside in the tests/
directory (i.e. full path tests/qemu-iotests/tests).  Fix it.

Thanks to the previous two commits, all named tests pass its scrutiny,
so we do not have to add anything to SKIP_FILES.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/297 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Willian Rampazzo March 29, 2021, 3:40 p.m. UTC | #1
On Mon, Mar 29, 2021 at 10:28 AM Max Reitz <mreitz@redhat.com> wrote:
>
> 297 so far does not check the named tests, which reside in the tests/
> directory (i.e. full path tests/qemu-iotests/tests).  Fix it.
>
> Thanks to the previous two commits, all named tests pass its scrutiny,
> so we do not have to add anything to SKIP_FILES.
>
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>  tests/qemu-iotests/297 | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Vladimir Sementsov-Ogievskiy March 30, 2021, 5 p.m. UTC | #2
29.03.2021 16:26, Max Reitz wrote:
> 297 so far does not check the named tests, which reside in the tests/
> directory (i.e. full path tests/qemu-iotests/tests).  Fix it.
> 
> Thanks to the previous two commits, all named tests pass its scrutiny,
> so we do not have to add anything to SKIP_FILES.
> 
> Signed-off-by: Max Reitz<mreitz@redhat.com>

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

Patch

diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297
index e3244d40a0..ce0e82e279 100755
--- a/tests/qemu-iotests/297
+++ b/tests/qemu-iotests/297
@@ -55,8 +55,9 @@  def is_python_file(filename):
 
 
 def run_linters():
-    files = [filename for filename in (set(os.listdir('.')) - set(SKIP_FILES))
-             if is_python_file(filename)]
+    named_tests = [f'tests/{entry}' for entry in os.listdir('tests')]
+    check_tests = set(os.listdir('.') + named_tests) - set(SKIP_FILES)
+    files = [filename for filename in check_tests if is_python_file(filename)]
 
     iotests.logger.debug('Files to be checked:')
     iotests.logger.debug(', '.join(sorted(files)))