Skip to contentSkip to conversation

tests/qemu-iotests/testrunner: Supply a test plan in TAP mode

PATCH Applied Thomas Huth 2 participants 2 messages Feb 23, 2022 – Mar 21, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 tests/qemu-iotests/testrunner.py | 1 +
 1 file changed, 1 insertion(+)
tests/qemu-iotests/testrunner.py +1 -0
index 9a94273975..30ab829def 100644
@@ -377,6 +377,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()
 
Signature · 1 line
2.27.0
Applied
#1 lore raw
Quoted 9 lines · Thomas Huth

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.

---
  tests/qemu-iotests/testrunner.py | 1 +
  1 file changed, 1 insertion(+)

Yep, that seems to work nicely.  Thanks!

Applied to my block branch (better late than never):

https://gitlab.com/hreitz/qemu/-/commits/block

Hanna