From 0143bf22d4d0a4a63a760c2773ba63d9d39a05ed Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 9 Nov 2023 16:37:52 +1100 Subject: [PATCH] autotest: understand verbose and very_vrbose for wait_message_field_values --- Tools/autotest/vehicle_test_suite.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Tools/autotest/vehicle_test_suite.py b/Tools/autotest/vehicle_test_suite.py index 543bb6d5d0496..be940085b3b3d 100644 --- a/Tools/autotest/vehicle_test_suite.py +++ b/Tools/autotest/vehicle_test_suite.py @@ -3915,7 +3915,16 @@ def assert_received_message_field_values(self, return m # FIXME: try to use wait_and_maintain here? - def wait_message_field_values(self, message, fieldvalues, timeout=10, epsilon=None, instance=None, minimum_duration=None): + def wait_message_field_values(self, + message, + fieldvalues, + timeout=10, + epsilon=None, + instance=None, + minimum_duration=None, + verbose=False, + very_verbose=False, + ): tstart = self.get_sim_time_cached() pass_start = None @@ -3923,8 +3932,13 @@ def wait_message_field_values(self, message, fieldvalues, timeout=10, epsilon=No now = self.get_sim_time_cached() if now - tstart > timeout: raise NotAchievedException("Field never reached values") - m = self.assert_receive_message(message, instance=instance) - if self.message_has_field_values(m, fieldvalues, epsilon=epsilon): + m = self.assert_receive_message( + message, + instance=instance, + verbose=verbose, + very_verbose=very_verbose, + ) + if self.message_has_field_values(m, fieldvalues, epsilon=epsilon, verbose=verbose): if minimum_duration is not None: if pass_start is None: pass_start = now