Skip to content

WLua: Only truncate hex dump lines for test case output checks#1052

Merged
tridge merged 1 commit intoArduPilot:masterfrom
shancock884:wlua-untruncated-tests
Jul 14, 2025
Merged

WLua: Only truncate hex dump lines for test case output checks#1052
tridge merged 1 commit intoArduPilot:masterfrom
shancock884:wlua-untruncated-tests

Conversation

@shancock884
Copy link
Contributor

Currently the Wireshark LUA test cases truncate all lines at 72 characters because the tshark output for byte-stream lines gets truncated with a '...' at one point.
This change alters the logic so that only byte-stream lines are truncated, rather than all lines.
Byte-steam lines are recognised by matching a regular expression of at least 60-consecutive [0-9a-z] characters.

This ensures that relevant parts of the test output are not lost. For example:

.... .... .... .... ...1 = MAV_PROTOCOL_CAPABILITY_MISSION_F
vs
.... .... .... .... ...1 = MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT: True

This becomes even more relevant for a test case I plan to add for 64-bit bitfields in an upcoming PR fix for issue #895.

Tested via local running of pytest and CI.

@tridge tridge merged commit 5945ea9 into ArduPilot:master Jul 14, 2025
14 checks passed
@shancock884 shancock884 deleted the wlua-untruncated-tests branch July 15, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants