From fd88077fa32f47c63b50371a939e1b4e0ae4e22c Mon Sep 17 00:00:00 2001 From: Hans-Joachim Krauch Date: Tue, 26 Sep 2023 19:43:01 +0200 Subject: [PATCH] Fix ROS2 CI for iron & rolling (#875) --- rosapi/test/test_stringify_field_types.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/rosapi/test/test_stringify_field_types.py b/rosapi/test/test_stringify_field_types.py index a1d43563e..ca551bbd0 100644 --- a/rosapi/test/test_stringify_field_types.py +++ b/rosapi/test/test_stringify_field_types.py @@ -137,17 +137,19 @@ def test_stringify_field_types(self): ) try: - self.assertEqual( + # We match against a regex here as the Gid.msg differs between distros: + # Distros up to humble use 24 bytes, more recent distros use 16 bytes. + # See https://github.com/ros2/rmw_dds_common/pull/68 + self.assertRegex( stringify_field_types("rmw_dds_common/NodeEntitiesInfo"), - """\ -string<=256 node_namespace + r"""string<=256 node_namespace string<=256 node_name -Gid[] reader_gid_seq -Gid[] writer_gid_seq +Gid\[\] reader_gid_seq +Gid\[\] writer_gid_seq ================================================================================ MSG: rmw_dds_common/Gid -char[24] data +char\[(24|16)\] data """, ) except InvalidModuleException: