Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/functional/constants/ovms_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ class OvmsMessages:
ERROR_INVALID_LAYOUT_NHWC = "Received binary image input but resource not configured to accept NHWC layout"
ERROR_BINARY_INPUTS_CONVERSION_FAILED = "Binary inputs conversion failed."
ERROR_BINARY_INPUTS_NATIVE_FILE_FORMAT_CONVERSION = "Input native file format conversion failed"
ERROR_BINARY_INPUTS_DECODED_SIZE_ESTIMATION = "Decoded size could not be estimated for input"
ERROR_BINARY_INPUTS_CORRUPT_JPEG_DATA = "Corrupt JPEG data"

ERROR_INTERPOLATE_NODE_IS_NOT_SUPPORTED = "Interpolate node is not supported:"
Expand Down
26 changes: 13 additions & 13 deletions tests/functional/object_model/ovms_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,19 +399,19 @@ def get_signal_type(terminate_signal_type):
raise NotImplementedError(f"Unknown signal: {terminate_signal_type}")

def filter_unexpected_messages(self, unexpected_messages):
for msg in unexpected_messages:
# 1) This message is expected in OV tests with batch_size=0
# 2) This message can happen in Cython instances that use threading # CVS-165321
if all([
OvmsMessages.ERROR_TERMINATE_CALLED in msg,
self.context is not None and "test_ov_app_cpp_batch_size_0" in self.context.name,
]) or all([
OvmsMessages.ERROR_TERMINATE_CALLED in msg,
OvmsMessages.STD_SYSTEM_ERROR in msg,
hasattr(self, "cmd") and self.cmd is not None and "OvmsCapiInstance" in self.cmd.__str__,
]):
unexpected_messages.remove(msg)
return unexpected_messages
return [msg for msg in unexpected_messages if not self._is_expected_message(msg)]

def _is_expected_message(self, msg):
# 1) This message is expected in OV tests with batch_size=0
# 2) This message can happen in Cython instances that use threading # CVS-165321
return all([
OvmsMessages.ERROR_TERMINATE_CALLED in msg,
self.context is not None and "test_ov_app_cpp_batch_size_0" in self.context.name,
]) or all([
OvmsMessages.ERROR_TERMINATE_CALLED in msg,
OvmsMessages.STD_SYSTEM_ERROR in msg,
getattr(self, "cmd", None) is not None and "OvmsCapiInstance" in str(self.cmd),
])

def cleanup(self, timeout=30):
try:
Expand Down
Loading