[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 08/16] iotests/297: Create main() function
From: |
John Snow |
Subject: |
[PATCH v3 08/16] iotests/297: Create main() function |
Date: |
Thu, 16 Sep 2021 00:09:47 -0400 |
Instead of running "run_linters" directly, create a main() function that
will be responsible for environment setup, leaving run_linters()
responsible only for execution of the linters.
(That environment setup will be moved over in forthcoming commits.)
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
tests/qemu-iotests/297 | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/297 b/tests/qemu-iotests/297
index 01dd8147d5..6df952808d 100755
--- a/tests/qemu-iotests/297
+++ b/tests/qemu-iotests/297
@@ -123,8 +123,12 @@ def run_linters():
print(p.stdout)
-for linter in ('pylint-3', 'mypy'):
- if shutil.which(linter) is None:
- iotests.notrun(f'{linter} not found')
+def main() -> None:
+ for linter in ('pylint-3', 'mypy'):
+ if shutil.which(linter) is None:
+ iotests.notrun(f'{linter} not found')
-iotests.script_main(run_linters)
+ run_linters()
+
+
+iotests.script_main(main)
--
2.31.1
- Re: [PATCH v3 03/16] iotests/migrate-bitmaps-postcopy-test: declare instance variables, (continued)
- [PATCH v3 05/16] iotests/297: modify is_python_file to work from any CWD, John Snow, 2021/09/16
- [PATCH v3 06/16] iotests/297: Add get_files() function, John Snow, 2021/09/16
- [PATCH v3 07/16] iotests/297: Don't rely on distro-specific linter binaries, John Snow, 2021/09/16
- [PATCH v3 08/16] iotests/297: Create main() function,
John Snow <=
- [PATCH v3 09/16] iotests/297: Separate environment setup from test execution, John Snow, 2021/09/16
- [PATCH v3 10/16] iotests/297: Add 'directory' argument to run_linters, John Snow, 2021/09/16
- [PATCH v3 11/16] iotests/297: return error code from run_linters(), John Snow, 2021/09/16
- [PATCH v3 13/16] iotests/linters: Add entry point for Python CI linters, John Snow, 2021/09/16