diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-12-03 13:22:22 +0100 |
---|---|---|
committer | Hanna Reitz <hreitz@redhat.com> | 2021-12-22 16:29:48 +0100 |
commit | 1f257b70d143d6c3330e6194bd977483c5f61b9b (patch) | |
tree | 2869649d9361ce66b4c4ea3737fcd306717cb0c7 /tests/qemu-iotests | |
parent | 02dd48f8598be6c6be005594c5a6adca147b3a78 (diff) | |
download | qemu-1f257b70d143d6c3330e6194bd977483c5f61b9b.zip qemu-1f257b70d143d6c3330e6194bd977483c5f61b9b.tar.gz qemu-1f257b70d143d6c3330e6194bd977483c5f61b9b.tar.bz2 |
iotests/testrunner.py: move updating last_elapsed to run_tests
We are going to use do_run_test() in multiprocessing environment, where
we'll not be able to change original runner object.
Happily, the only thing we change is that last_elapsed and it's simple
to do it in run_tests() instead. All other accesses to self in
do_runt_test() and in run_test() are read-only.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20211203122223.2780098-3-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/qemu-iotests')
-rw-r--r-- | tests/qemu-iotests/testrunner.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py index fa84225..a9f2feb 100644 --- a/tests/qemu-iotests/testrunner.py +++ b/tests/qemu-iotests/testrunner.py @@ -287,7 +287,6 @@ class TestRunner(ContextManager['TestRunner']): diff=diff, casenotrun=casenotrun) else: f_bad.unlink() - self.last_elapsed.update(test, elapsed) return TestResult(status='pass', elapsed=elapsed, casenotrun=casenotrun) @@ -353,6 +352,9 @@ class TestRunner(ContextManager['TestRunner']): print('\n'.join(res.diff)) elif res.status == 'not run': notrun.append(name) + elif res.status == 'pass': + assert res.elapsed is not None + self.last_elapsed.update(t, res.elapsed) sys.stdout.flush() if res.interrupted: |