iotests: add filter_generated_node_ids
authorJohn Snow <jsnow@redhat.com>
Fri, 21 Dec 2018 09:35:24 +0000 (04:35 -0500)
committerEric Blake <eblake@redhat.com>
Mon, 14 Jan 2019 16:09:46 +0000 (10:09 -0600)
To mimic the common filter of the same name, but for the python tests.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20181221093529.23855-7-jsnow@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
tests/qemu-iotests/iotests.py

index a34e66813a35bfa2c396d09ac3b3fcc3381a964b..9595429fea2728a2bbea0504442d0839b011bc21 100644 (file)
@@ -239,6 +239,9 @@ def filter_testfiles(msg):
     prefix = os.path.join(test_dir, "%s-" % (os.getpid()))
     return msg.replace(prefix, 'TEST_DIR/PID-')
 
+def filter_generated_node_ids(msg):
+    return re.sub("#block[0-9]+", "NODE_NAME", msg)
+
 def filter_img_info(output, filename):
     lines = []
     for line in output.split('\n'):