Skip to content

Commit 2558346

Browse files
gchwiernordicjm
authored andcommitted
Reapply "tests: subsys: esb: Add ESB sample integration test"
This reverts commit e7d1532. Changed ZEPHYR_BASE in YAML test file to ZEPHYR_NRF_MODULE_DIR Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
1 parent 886f637 commit 2558346

3 files changed

Lines changed: 113 additions & 0 deletions

File tree

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,7 @@
10931093
/tests/subsys/dfu/ @nrfconnect/ncs-eris
10941094
/tests/subsys/dfu/dfu_multi_image/ @Damian-Nordic
10951095
/tests/subsys/emds/ @nrfconnect/ncs-paladin
1096+
/tests/subsys/esb/ @nrfconnect/ncs-si-xcake
10961097
/tests/subsys/event_manager_proxy/ @nrfconnect/ncs-si-bluebagel @nrfconnect/ncs-si-muffin @nrfconnect/ncs-si-xcake
10971098
/tests/subsys/fw_info/ @nrfconnect/ncs-eris
10981099
/tests/subsys/ipc/ @nrfconnect/ncs-low-level-test @anangl
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright (c) 2026 Nordic Semiconductor ASA
2+
#
3+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
4+
import logging
5+
6+
import pytest
7+
from twister_harness import DeviceAdapter
8+
9+
logger = logging.getLogger(__name__)
10+
11+
12+
def test_basic(duts: list[DeviceAdapter]):
13+
"""Verify ESB prx and ptx samples communicate over the air.
14+
15+
Boot both DUTs, check that each sample reports initialization
16+
complete, then confirm the prx receives packets and the ptx gets
17+
TX success events.
18+
"""
19+
assert len(duts) > 1, "This test requires at least two DUTs, ESB PTX and ESB PRX"
20+
dut_rx = duts[0]
21+
dut_tx = duts[1]
22+
23+
logger.info("Waiting for initialization complete messages...")
24+
lines = dut_rx.readlines_until(regex="Initialization complete", timeout=10)
25+
pytest.LineMatcher(lines).fnmatch_lines(
26+
["*Enhanced ShockBurst prx sample", "*Initialization complete"]
27+
)
28+
lines = dut_tx.readlines_until(regex="Initialization complete", timeout=10)
29+
pytest.LineMatcher(lines).fnmatch_lines(
30+
["*Enhanced ShockBurst ptx sample", "*Initialization complete"]
31+
)
32+
33+
logger.info("Waiting for packets to be received and TX success events...")
34+
dut_rx.readlines_until(regex="Packet received", timeout=10)
35+
logger.info("Waiting for TX success events...")
36+
dut_tx.readlines_until(regex="TX SUCCESS EVENT", timeout=10)
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
common:
2+
tags:
3+
- esb
4+
- ci_tests_subsys_esb
5+
harness: pytest
6+
build: false
7+
8+
tests:
9+
test.sample.esb.same_boards_connected:
10+
integration_platforms:
11+
- nrf52840dk/nrf52840
12+
- nrf54l15dk/nrf54l15/cpuapp
13+
- nrf54h20dk/nrf54h20/cpurad
14+
platform_allow: &platform_allow_basic
15+
- nrf52840dk/nrf52840
16+
- nrf5340dk/nrf5340/cpunet
17+
- nrf54h20dk/nrf54h20/cpurad
18+
- nrf54l15dk/nrf54l15/cpuapp
19+
- nrf54lm20dk/nrf54lm20b/cpuapp
20+
- nrf54ls05dk/nrf54ls05b/cpuapp
21+
- nrf54lc10dk/nrf54lc10a/cpuapp
22+
- nrf54lv10dk/nrf54lv10a/cpuapp
23+
required_applications:
24+
- application: sample.esb.prx.build
25+
path: $ZEPHYR_NRF_MODULE_DIR/samples/esb/esb_prx
26+
harness_config:
27+
required_devices:
28+
- application: sample.esb.ptx.build
29+
path: $ZEPHYR_NRF_MODULE_DIR/samples/esb/esb_ptx
30+
31+
test.sample.esb.nrf54h20_with_other_board:
32+
integration_platforms:
33+
- nrf52840dk/nrf52840
34+
- nrf54l15dk/nrf54l15/cpuapp
35+
- nrf54lm20dk/nrf54lm20b/cpuapp
36+
platform_allow: *platform_allow_basic
37+
platform_exclude:
38+
- nrf54h20dk/nrf54h20/cpurad
39+
required_applications:
40+
- application: sample.esb.prx.build
41+
path: $ZEPHYR_NRF_MODULE_DIR/samples/esb/esb_prx
42+
harness_config:
43+
required_devices:
44+
- application: sample.esb.ptx.build
45+
path: $ZEPHYR_NRF_MODULE_DIR/samples/esb/esb_ptx
46+
platform: nrf54h20dk/nrf54h20/cpurad
47+
48+
test.sample.esb.dynamic_irq:
49+
integration_platforms:
50+
- nrf5340dk/nrf5340/cpunet
51+
- nrf54h20dk/nrf54h20/cpurad
52+
platform_allow:
53+
- nrf5340dk/nrf5340/cpunet
54+
- nrf52840dk/nrf52840
55+
- nrf54l15dk/nrf54l15/cpuapp
56+
- nrf54h20dk/nrf54h20/cpurad
57+
required_applications:
58+
- application: sample.esb.prx.dynamic_irq
59+
path: $ZEPHYR_NRF_MODULE_DIR/samples/esb/esb_prx
60+
harness_config:
61+
required_devices:
62+
- application: sample.esb.ptx.dynamic_irq
63+
path: $ZEPHYR_NRF_MODULE_DIR/samples/esb/esb_ptx
64+
65+
test.sample.esb.fast_switching:
66+
integration_platforms:
67+
- nrf54h20dk/nrf54h20/cpurad
68+
platform_allow:
69+
- nrf54h20dk/nrf54h20/cpurad
70+
required_applications:
71+
- application: sample.esb.prx.fast_switching
72+
path: $ZEPHYR_NRF_MODULE_DIR/samples/esb/esb_prx
73+
harness_config:
74+
required_devices:
75+
- application: sample.esb.ptx.fast_switching
76+
path: $ZEPHYR_NRF_MODULE_DIR/samples/esb/esb_ptx

0 commit comments

Comments
 (0)