Skip to content

Commit 74b264f

Browse files
committed
verification: cocotb: Unified convention of tests' naming
Signed-off-by: Grzegorz Latosinski <[email protected]>
1 parent 416d1ab commit 74b264f

File tree

16 files changed

+53
-53
lines changed

16 files changed

+53
-53
lines changed

verification/cocotb/block/i2c/test_write.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async def test_write_sequence(
6161

6262

6363
@cocotb.test()
64-
async def run_test(dut):
64+
async def test_write(dut):
6565
TARGET_ADDR = 0x18
6666
CLK_SPEED = 400e3
6767

verification/cocotb/block/i2c_controller_fsm/test_mem_rw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818

1919
@cocotb.test()
20-
async def run_test(dut):
20+
async def test_mem_rw(dut):
2121
"""
2222
Executes random read and writes while checking data on the I2C FSM.
2323
"""

verification/cocotb/block/i2c_standby_controller/test_read.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def ord_or_null(idx):
102102

103103

104104
@cocotb.test()
105-
async def run_test(dut):
105+
async def test_read(dut):
106106
TARGET_ADDR = 0x18
107107
CLK_SPEED = 400e3
108108

verification/cocotb/block/i2c_standby_controller/test_wr_restart_rd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ async def master_write_read():
159159

160160

161161
@cocotb.test()
162-
async def run_test(dut):
162+
async def test_wr_restart_rd(dut):
163163
TARGET_ADDR = 12
164164
CLK_SPEED = 400000
165165

verification/cocotb/block/i2c_target_fsm/test_mem_r.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ async def test_read_sequence(dut: Any, address: int, master: I2cMaster, data: by
7575

7676

7777
@cocotb.test()
78-
async def run_test(dut):
78+
async def test_mem_r(dut):
7979
TARGET_ADDR = 12
8080
CLK_SPEED = 400000
8181

verification/cocotb/block/i2c_target_fsm/test_mem_w.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def MatchWDataExact(value, dut):
4848

4949

5050
@cocotb.test()
51-
async def run_test(dut):
51+
async def test_mem_w(dut):
5252
TARGET_ADDR = 12
5353
CLK_SPEED = 400000
5454

verification/cocotb/block/lib_adapter/test_csr_sw_access.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async def write_csr_and_verify(
6565

6666
# Common test cases for frontend adapters:
6767
@cocotb.test()
68-
async def run_read_hci_version_csr(dut: SimHandleBase):
68+
async def test_read_hci_version_csr(dut: SimHandleBase):
6969
"""Run test to read HCI version register."""
7070

7171
tb = get_frontend_bus_if()(dut)
@@ -78,7 +78,7 @@ async def run_read_hci_version_csr(dut: SimHandleBase):
7878

7979

8080
@cocotb.test()
81-
async def run_read_pio_section_offset(dut: SimHandleBase):
81+
async def test_read_pio_section_offset(dut: SimHandleBase):
8282
"""Run test to read PIO section offset register."""
8383

8484
tb = get_frontend_bus_if()(dut)
@@ -88,7 +88,7 @@ async def run_read_pio_section_offset(dut: SimHandleBase):
8888

8989

9090
@cocotb.test()
91-
async def run_write_to_controller_device_addr(dut: SimHandleBase):
91+
async def test_write_to_controller_device_addr(dut: SimHandleBase):
9292
"""Run test to write & read from Controller Device Address."""
9393

9494
tb = get_frontend_bus_if()(dut)
@@ -102,7 +102,7 @@ async def run_write_to_controller_device_addr(dut: SimHandleBase):
102102

103103

104104
@cocotb.test()
105-
async def run_write_should_not_affect_ro_csr(dut: SimHandleBase):
105+
async def test_write_should_not_affect_ro_csr(dut: SimHandleBase):
106106
"""Run test to write to RO HC Capabilities."""
107107

108108
tb = get_frontend_bus_if()(dut)
@@ -118,7 +118,7 @@ async def run_write_should_not_affect_ro_csr(dut: SimHandleBase):
118118

119119

120120
@cocotb.test()
121-
async def run_sequence_csr_read(dut: SimHandleBase):
121+
async def test_sequence_csr_read(dut: SimHandleBase):
122122
tb = get_frontend_bus_if()(dut)
123123
await tb.register_test_interfaces()
124124

@@ -152,7 +152,7 @@ async def run_sequence_csr_read(dut: SimHandleBase):
152152

153153

154154
@cocotb.test()
155-
async def run_sequence_csr_write(dut: SimHandleBase):
155+
async def test_sequence_csr_write(dut: SimHandleBase):
156156
tb = get_frontend_bus_if()(dut)
157157
await tb.register_test_interfaces()
158158

verification/cocotb/block/lib_hci_queues/test_clear.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
@cocotb.test()
14-
async def run_clear_on_nonempty_resp_queue(dut: SimHandleBase):
14+
async def test_clear_on_nonempty_resp_queue(dut: SimHandleBase):
1515
"""
1616
Issue Response queue clear through RESET_CONTROL and verify the newly enqueued
1717
response will be returned on the read
@@ -39,7 +39,7 @@ async def run_clear_on_nonempty_resp_queue(dut: SimHandleBase):
3939

4040

4141
@cocotb.test()
42-
async def run_clear_on_nonempty_cmd_queue(dut: SimHandleBase):
42+
async def test_clear_on_nonempty_cmd_queue(dut: SimHandleBase):
4343
"""
4444
Issue Command queue clear through RESET_CONTROL and verify the newly enqueued
4545
command will be returned on the read
@@ -66,7 +66,7 @@ async def run_clear_on_nonempty_cmd_queue(dut: SimHandleBase):
6666

6767

6868
@cocotb.test()
69-
async def run_clear_on_nonempty_rx_queue(dut: SimHandleBase):
69+
async def test_clear_on_nonempty_rx_queue(dut: SimHandleBase):
7070
"""
7171
Issue RX queue clear through RESET_CONTROL and verify the newly enqueued
7272
data will be returned on the read
@@ -91,7 +91,7 @@ async def run_clear_on_nonempty_rx_queue(dut: SimHandleBase):
9191

9292

9393
@cocotb.test()
94-
async def run_clear_on_nonempty_tx_queue(dut: SimHandleBase):
94+
async def test_clear_on_nonempty_tx_queue(dut: SimHandleBase):
9595
"""
9696
Issue TX queue clear through RESET_CONTROL and verify the newly enqueued
9797
data will be returned on the read
@@ -116,7 +116,7 @@ async def run_clear_on_nonempty_tx_queue(dut: SimHandleBase):
116116

117117

118118
@cocotb.test()
119-
async def run_clear_on_nonempty_ibi_queue(dut: SimHandleBase):
119+
async def test_clear_on_nonempty_ibi_queue(dut: SimHandleBase):
120120
"""
121121
Issue IBI queue clear through RESET_CONTROL and verify the newly enqueued
122122
data will be returned on the read

verification/cocotb/block/lib_hci_queues/test_empty.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,50 +20,50 @@ async def should_be_empty_after_rst(dut: SimHandleBase, if_name: str, queue: str
2020

2121

2222
@cocotb.test()
23-
async def run_cmd_capacity_status_test(dut: SimHandleBase):
23+
async def test_cmd_capacity_status(dut: SimHandleBase):
2424
await should_be_empty_after_rst(dut, "hci", "cmd")
2525

2626

2727
@cocotb.test()
28-
async def run_rx_capacity_status_test(dut: SimHandleBase):
28+
async def test_rx_capacity_status(dut: SimHandleBase):
2929
await should_be_empty_after_rst(dut, "hci", "rx")
3030

3131

3232
@cocotb.test()
33-
async def run_resp_capacity_status_test(dut: SimHandleBase):
33+
async def test_resp_capacity_status(dut: SimHandleBase):
3434
await should_be_empty_after_rst(dut, "hci", "resp")
3535

3636

3737
@cocotb.test()
38-
async def run_tx_capacity_status_test(dut: SimHandleBase):
38+
async def test_tx_capacity_status(dut: SimHandleBase):
3939
await should_be_empty_after_rst(dut, "hci", "tx")
4040

4141

4242
@cocotb.test()
43-
async def run_ibi_capacity_status_test(dut: SimHandleBase):
43+
async def test_ibi_capacity_status(dut: SimHandleBase):
4444
await should_be_empty_after_rst(dut, "hci", "ibi")
4545

4646

4747
@cocotb.test()
48-
async def run_tti_tx_desc_capacity_status_test(dut: SimHandleBase):
48+
async def test_tti_tx_desc_capacity_status(dut: SimHandleBase):
4949
await should_be_empty_after_rst(dut, "tti", "tx_desc")
5050

5151

5252
@cocotb.test()
53-
async def run_tti_rx_capacity_status_test(dut: SimHandleBase):
53+
async def test_tti_rx_capacity_status(dut: SimHandleBase):
5454
await should_be_empty_after_rst(dut, "tti", "rx")
5555

5656

5757
@cocotb.test()
58-
async def run_tti_rx_desc_capacity_status_test(dut: SimHandleBase):
58+
async def test_tti_rx_desc_capacity_status(dut: SimHandleBase):
5959
await should_be_empty_after_rst(dut, "tti", "rx_desc")
6060

6161

6262
@cocotb.test()
63-
async def run_tti_tx_capacity_status_test(dut: SimHandleBase):
63+
async def test_tti_tx_capacity_status(dut: SimHandleBase):
6464
await should_be_empty_after_rst(dut, "tti", "tx")
6565

6666

6767
@cocotb.test()
68-
async def run_tti_ibi_capacity_status_test(dut: SimHandleBase):
68+
async def test_tti_ibi_capacity_status(dut: SimHandleBase):
6969
await should_be_empty_after_rst(dut, "tti", "ibi")

verification/cocotb/block/lib_hci_queues/test_threshold.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -417,67 +417,67 @@ async def should_setup_ready_threshold(interface: HCIBaseTestInterface, q: Queue
417417

418418

419419
@cocotb.test()
420-
async def run_cmd_setup_threshold_test(dut: SimHandleBase):
420+
async def test_cmd_setup_threshold(dut: SimHandleBase):
421421
interface = await setup_sim(dut, "hci")
422422
await should_setup_ready_threshold(interface, CmdQueueThldHandler())
423423

424424

425425
@cocotb.test()
426-
async def run_rx_setup_threshold_test(dut: SimHandleBase):
426+
async def test_rx_setup_threshold(dut: SimHandleBase):
427427
interface = await setup_sim(dut, "hci")
428428
await should_setup_start_threshold(interface, RxQueueThldHandler())
429429
await should_setup_ready_threshold(interface, RxQueueThldHandler())
430430

431431

432432
@cocotb.test()
433-
async def run_tx_setup_threshold_test(dut: SimHandleBase):
433+
async def test_tx_setup_threshold(dut: SimHandleBase):
434434
interface = await setup_sim(dut, "hci")
435435
await should_setup_start_threshold(interface, TxQueueThldHandler())
436436
await should_setup_ready_threshold(interface, TxQueueThldHandler())
437437

438438

439439
@cocotb.test()
440-
async def run_resp_setup_threshold_test(dut: SimHandleBase):
440+
async def test_resp_setup_threshold(dut: SimHandleBase):
441441
interface = await setup_sim(dut, "hci")
442442
await should_setup_ready_threshold(interface, RespQueueThldHandler())
443443

444444

445445
@cocotb.test()
446-
async def run_ibi_setup_threshold_test(dut: SimHandleBase):
446+
async def test_ibi_setup_threshold(dut: SimHandleBase):
447447
interface = await setup_sim(dut, "hci")
448448
await should_setup_ready_threshold(interface, IbiQueueThldHandler())
449449

450450

451451
@cocotb.test()
452-
async def run_tti_tx_desc_setup_threshold_test(dut: SimHandleBase):
452+
async def test_tti_tx_desc_setup_threshold(dut: SimHandleBase):
453453
interface = await setup_sim(dut, "tti")
454454
await should_setup_ready_threshold(interface, TTITxDescQueueThldHandler())
455455

456456

457457
@cocotb.test()
458-
async def run_tti_rx_setup_threshold_test(dut: SimHandleBase):
458+
async def test_tti_rx_setup_threshold(dut: SimHandleBase):
459459
interface = await setup_sim(dut, "tti")
460460
# TODO: Enable start threshold test once it's added to the design
461461
# await should_setup_start_threshold(interface, TTIRxQueueThldHandler())
462462
await should_setup_ready_threshold(interface, TTIRxQueueThldHandler())
463463

464464

465465
@cocotb.test()
466-
async def run_tti_tx_setup_threshold_test(dut: SimHandleBase):
466+
async def test_tti_tx_setup_threshold(dut: SimHandleBase):
467467
interface = await setup_sim(dut, "tti")
468468
# TODO: Enable start threshold test once it's added to the design
469469
# await should_setup_start_threshold(interface, TTITxQueueThldHandler())
470470
await should_setup_ready_threshold(interface, TTITxQueueThldHandler())
471471

472472

473473
@cocotb.test()
474-
async def run_tti_rx_desc_setup_threshold_test(dut: SimHandleBase):
474+
async def test_tti_rx_desc_setup_threshold(dut: SimHandleBase):
475475
interface = await setup_sim(dut, "tti")
476476
await should_setup_ready_threshold(interface, TTIRxDescQueueThldHandler())
477477

478478

479479
@cocotb.test()
480-
async def run_tti_ibi_setup_threshold_test(dut: SimHandleBase):
480+
async def test_tti_ibi_setup_threshold(dut: SimHandleBase):
481481
interface = await setup_sim(dut, "tti")
482482
await should_setup_ready_threshold(interface, TtiIbiQueueThldHandler())
483483

@@ -596,32 +596,32 @@ async def should_raise_ready_thld_trig_receiver(
596596

597597

598598
@cocotb.test()
599-
async def run_resp_should_raise_thld_trig_test(dut: SimHandleBase):
599+
async def test_resp_should_raise_thld_trig(dut: SimHandleBase):
600600
interface = await setup_sim(dut, "hci")
601601
await should_raise_ready_thld_trig_receiver(interface, RespQueueThldHandler())
602602

603603

604604
@cocotb.test()
605-
async def run_rx_should_raise_thld_trig_test(dut: SimHandleBase):
605+
async def test_rx_should_raise_thld_trig(dut: SimHandleBase):
606606
interface = await setup_sim(dut, "hci")
607607
await should_raise_start_thld_trig_receiver(interface, RxQueueThldHandler())
608608
await should_raise_ready_thld_trig_receiver(interface, RxQueueThldHandler())
609609

610610

611611
@cocotb.test()
612-
async def run_ibi_should_raise_thld_trig_test(dut: SimHandleBase):
612+
async def test_ibi_should_raise_thld_trig(dut: SimHandleBase):
613613
interface = await setup_sim(dut, "hci")
614614
await should_raise_ready_thld_trig_receiver(interface, IbiQueueThldHandler())
615615

616616

617617
@cocotb.test()
618-
async def run_tti_rx_desc_should_raise_thld_trig_test(dut: SimHandleBase):
618+
async def test_tti_rx_desc_should_raise_thld_trig(dut: SimHandleBase):
619619
interface = await setup_sim(dut, "tti")
620620
await should_raise_ready_thld_trig_receiver(interface, TTIRxDescQueueThldHandler())
621621

622622

623623
@cocotb.test()
624-
async def run_tti_rx_should_raise_thld_trig_test(dut: SimHandleBase):
624+
async def test_tti_rx_should_raise_thld_trig(dut: SimHandleBase):
625625
interface = await setup_sim(dut, "tti")
626626
# TODO: Enable start threshold test once it's added to the design
627627
await should_raise_start_thld_trig_receiver(interface, TTIRxQueueThldHandler())
@@ -745,20 +745,20 @@ async def should_raise_ready_thld_trig_transmitter(
745745

746746

747747
@cocotb.test()
748-
async def run_cmd_should_raise_thld_trig_test(dut: SimHandleBase):
748+
async def test_cmd_should_raise_thld_trig(dut: SimHandleBase):
749749
interface = await setup_sim(dut, "hci")
750750
await should_raise_ready_thld_trig_transmitter(interface, CmdQueueThldHandler())
751751

752752

753753
@cocotb.test()
754-
async def run_tx_should_raise_thld_trig_test(dut: SimHandleBase):
754+
async def test_tx_should_raise_thld_trig(dut: SimHandleBase):
755755
interface = await setup_sim(dut, "hci")
756756
await should_raise_start_thld_trig_transmitter(interface, TxQueueThldHandler())
757757
await should_raise_ready_thld_trig_transmitter(interface, TxQueueThldHandler())
758758

759759

760760
@cocotb.test()
761-
async def run_tti_tx_desc_should_raise_thld_trig_test(dut: SimHandleBase):
761+
async def test_tti_tx_desc_should_raise_thld_trig(dut: SimHandleBase):
762762
interface = await setup_sim(dut, "tti")
763763
await should_raise_ready_thld_trig_transmitter(interface, TTITxDescQueueThldHandler())
764764

@@ -768,14 +768,14 @@ async def run_tti_tx_desc_should_raise_thld_trig_test(dut: SimHandleBase):
768768
# falls through it hence is not accounted by the threshold counter. Fixing this
769769
# requires reworking the converter itself or the queue - converter interface.
770770
@cocotb.test(skip=True)
771-
async def run_tti_tx_should_raise_thld_trig_test(dut: SimHandleBase):
771+
async def test_tti_tx_should_raise_thld_trig(dut: SimHandleBase):
772772
interface = await setup_sim(dut, "tti")
773773
# TODO: Enable start threshold test once it's added to the design
774774
await should_raise_start_thld_trig_transmitter(interface, TTITxQueueThldHandler())
775775
await should_raise_ready_thld_trig_transmitter(interface, TTITxQueueThldHandler())
776776

777777

778778
@cocotb.test()
779-
async def run_tti_ibi_should_raise_thld_trig_test(dut: SimHandleBase):
779+
async def test_tti_ibi_should_raise_thld_trig(dut: SimHandleBase):
780780
interface = await setup_sim(dut, "tti")
781781
await should_raise_ready_thld_trig_transmitter(interface, TtiIbiQueueThldHandler())

0 commit comments

Comments
 (0)