[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 02/10] iotests/297: Add get_files() function
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [PATCH 02/10] iotests/297: Add get_files() function |
Date: |
Tue, 6 Jul 2021 12:01:56 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
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
iotests.logger.debug('Files to be checked:')
iotests.logger.debug(', '.join(sorted(files)))
--
Best regards,
Vladimir
- Re: [PATCH 02/10] iotests/297: Add get_files() function,
Vladimir Sementsov-Ogievskiy <=