summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2021-12-03 13:22:21 +0100
committerHanna Reitz <hreitz@redhat.com>2021-12-22 16:29:48 +0100
commit02dd48f8598be6c6be005594c5a6adca147b3a78 (patch)
tree774fe023a4f8d570087d0775f00a62edc553a264 /tests
parent8c5f94cd4182753959c8be8de415120dc879d8f0 (diff)
downloadqemu-02dd48f8598be6c6be005594c5a6adca147b3a78.zip
iotests/testrunner.py: add doc string for run_test()
We are going to modify these methods and will add more documentation in further commit. As a preparation add basic documentation. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20211203122223.2780098-2-vsementsov@virtuozzo.com> Reviewed-by: John Snow <jsnow@redhat.com> Tested-by: John Snow <jsnow@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/qemu-iotests/testrunner.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
index 0e29c2fddd..fa842252d3 100644
--- a/tests/qemu-iotests/testrunner.py
+++ b/tests/qemu-iotests/testrunner.py
@@ -220,6 +220,12 @@ class TestRunner(ContextManager['TestRunner']):
return f'{test}.out'
def do_run_test(self, test: str) -> TestResult:
+ """
+ Run one test
+
+ :param test: test file path
+ """
+
f_test = Path(test)
f_bad = Path(f_test.name + '.out.bad')
f_notrun = Path(f_test.name + '.notrun')
@@ -287,6 +293,13 @@ class TestRunner(ContextManager['TestRunner']):
def run_test(self, test: str,
test_field_width: Optional[int] = None) -> TestResult:
+ """
+ Run one test and print short status
+
+ :param test: test file path
+ :param test_field_width: width for first field of status format
+ """
+
last_el = self.last_elapsed.get(test)
start = datetime.datetime.now().strftime('%H:%M:%S')