From: Thomas Huth Date: Wed, 23 Feb 2022 09:58:16 +0000 (+0100) Subject: tests/qemu-iotests/testrunner: Supply a test plan in TAP mode X-Git-Tag: v7.0.0-rc1~4^2~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e48093a6c09e429f2bbe69c1e88b5b78f8b531f5;p=thirdparty%2Fqemu.git tests/qemu-iotests/testrunner: Supply a test plan in TAP mode Quoting the TAP specification: "The plan tells how many tests will be run [...]. It’s a check that the test file hasn’t stopped prematurely." That's a good idea of course, so let's support that in the iotest testrunner, too. Signed-off-by: Thomas Huth Message-Id: <20220223095816.2663005-1-thuth@redhat.com> Signed-off-by: Hanna Reitz --- diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py index 5c207225b14..aae70a83417 100644 --- a/tests/qemu-iotests/testrunner.py +++ b/tests/qemu-iotests/testrunner.py @@ -388,6 +388,7 @@ class TestRunner(ContextManager['TestRunner']): if self.tap: self.env.print_env('# ') + print('1..%d' % len(tests)) else: self.env.print_env()