Skip to content

Commit

Permalink
test for test
Browse files Browse the repository at this point in the history
  • Loading branch information
bongbui321 committed Sep 27, 2024
1 parent 5b96ffd commit 18f7290
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions tests/usbprotocol/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
set -e

# Loops over all HW_TYPEs, see board/boards/board_declarations.h
for hw_type in {0..7}; do
echo "Testing HW_TYPE: $hw_type"
HW_TYPE=$hw_type pytest -n logical .
for i in {0..50}; do
for hw_type in {0..7}; do
echo "Testing HW_TYPE: $hw_type"
HW_TYPE=$hw_type pytest -n logical .
done
done
6 changes: 3 additions & 3 deletions tests/usbprotocol/test_comms.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def setup_method(self):

def test_tx_queues(self):
for bus in range(len(TX_QUEUES)):
message = (0x100, b"test", bus)
message = (0x100, b"test1", bus)

can_pkt_tx = libpanda_py.make_CANPacket(message[0], message[2], message[1])
can_pkt_rx = libpanda_py.ffi.new('CANPacket_t *')
Expand All @@ -44,7 +44,7 @@ def test_tx_queues(self):

def test_comms_reset_rx(self):
# store some test messages in the queue
test_msg = (0x100, b"test", 0)
test_msg = (0x100, b"test2", 0)
for _ in range(100):
can_pkt_tx = libpanda_py.make_CANPacket(test_msg[0], test_msg[2], test_msg[1])
lpp.can_push(lpp.rx_q, can_pkt_tx)
Expand Down Expand Up @@ -76,7 +76,7 @@ def test_comms_reset_tx(self):
lpp.set_safety_hooks(Panda.SAFETY_ALLOUTPUT, 0)

# store some test messages in the queue
test_msg = (0x100, b"test", 0)
test_msg = (0x100, b"test3", 0)
packed = pack_can_buffer([test_msg for _ in range(100)])

# write a small chunk such that we have some overflow
Expand Down

0 comments on commit 18f7290

Please sign in to comment.