]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
tests/qemu-iotests/testrunner: Supply a test plan in TAP mode
authorThomas Huth <thuth@redhat.com>
Wed, 23 Feb 2022 09:58:16 +0000 (10:58 +0100)
committerHanna Reitz <hreitz@redhat.com>
Tue, 22 Mar 2022 08:40:54 +0000 (09:40 +0100)
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 <thuth@redhat.com>
Message-Id: <20220223095816.2663005-1-thuth@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
tests/qemu-iotests/testrunner.py

index 5c207225b14090af453aaaf50d840e50248320d8..aae70a8341725de96a439068a51f062982e6857b 100644 (file)
@@ -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()