Skip to content

Commit 3f83385

Browse files
committed
tests: Enable LUA testing for CI
1 parent abb7ffe commit 3f83385

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

tests/test_comm_dissector.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
# You should have received a copy of the GNU General Public License
2323
# along with this program. If not, see <http://www.gnu.org/licenses/>.
2424

25-
pckt_mavic_air_fcc = [0x55, 0x17, 0x04, 0x38, 0x02, 0x0e, 0x1d, 0x00, 0x40, 0x07, 0x30, 0x55, 0x53, 0x00, 0x00, 0x55, 0x53, 0x00, 0x00, 0x01, 0x00, 0xfe, 0x5d]
26-
pckt_mini_2_fcc = [0x55, 0x18, 0x04, 0x20, 0x02, 0x09, 0x00, 0x00, 0x40, 0x09, 0x27, 0x00, 0x02, 0x48, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x81, 0x1f]
27-
2825
import logging
2926
import subprocess
3027
import os
@@ -35,10 +32,11 @@
3532
import datetime
3633
import pytest
3734

38-
import array
39-
4035
LOGGER = logging.getLogger(__name__)
4136

37+
pckt_mavic_air_fcc = [0x55, 0x17, 0x04, 0x38, 0x02, 0x0e, 0x1d, 0x00, 0x40, 0x07, 0x30, 0x55, 0x53, 0x00, 0x00, 0x55, 0x53, 0x00, 0x00, 0x01, 0x00, 0xfe, 0x5d]
38+
pckt_mini_2_fcc = [0x55, 0x18, 0x04, 0x20, 0x02, 0x09, 0x00, 0x00, 0x40, 0x09, 0x27, 0x00, 0x02, 0x48, 0x00, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x81, 0x1f]
39+
4240
def write_one_packet_pcap(fname, userdlt, data):
4341
with open(fname, "wb") as out:
4442
out.write(struct.pack("=IHHiIII",
@@ -78,11 +76,10 @@ def case_comm_dissector_tshark_show(pcap_file, userdlt, proto_name, pckt, env=No
7876
write_one_packet_pcap(pcap_file, userdlt, bytearray(pckt))
7977
run_comm_dissector_tshark_show("tshark", str(pcap_file), proto_name, pkt_cmd, env=env)
8078

81-
# Make this a separate mark rather than comm, until our CI can execute this correctly
82-
@pytest.mark.commDISS
79+
@pytest.mark.comm
8380
def test_comm_dissector_tshark_show(tmp_path):
8481
""" Test dissecting a packet with Wiresharks tshark.
8582
"""
8683
test_env = os.environ.copy()
87-
case_comm_dissector_tshark_show(tmp_path / "dji-packet.pcap", 3, "DJI_DUMLv1", pckt_mavic_air_fcc, env=test_env)
88-
case_comm_dissector_tshark_show(tmp_path / "dji-packet.pcap", 3, "DJI_DUMLv1", pckt_mini_2_fcc, env=test_env)
84+
case_comm_dissector_tshark_show(tmp_path / "dji-packet-mavair.pcap", 3, "DJI_DUMLv1", pckt_mavic_air_fcc, env=test_env)
85+
case_comm_dissector_tshark_show(tmp_path / "dji-packet-mini2.pcap", 3, "DJI_DUMLv1", pckt_mini_2_fcc, env=test_env)

0 commit comments

Comments
 (0)