diff mbox series

[PULL,05/25] tests/qemu-iotests/testrunner: Supply a test plan in TAP mode

Message ID 20220322115647.726044-6-hreitz@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,01/25] tests: add (riscv virt) machine mapping to testenv | expand

Commit Message

Hanna Czenczek March 22, 2022, 11:56 a.m. UTC
From: Thomas Huth <thuth@redhat.com>

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 | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
index 5c207225b1..aae70a8341 100644
--- a/tests/qemu-iotests/testrunner.py
+++ b/tests/qemu-iotests/testrunner.py
@@ -388,6 +388,7 @@  def run_tests(self, tests: List[str], jobs: int = 1) -> bool:
 
         if self.tap:
             self.env.print_env('# ')
+            print('1..%d' % len(tests))
         else:
             self.env.print_env()