Skip to content

Commit c1906d2

Browse files
committed
tests: drivers: i2c: i2c_bme688: Extend upstream sample
Add test that reuses source code from "original" test that existing in the upstream Zephyr. Extend sample with configurations that rely on internal shields pca63565 and pca63566. Remove Twister alt-config for upstream test. Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
1 parent ccd5e6a commit c1906d2

File tree

6 files changed

+48
-12
lines changed

6 files changed

+48
-12
lines changed

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,7 @@
834834
/tests/drivers/flash/flash_rpc/ @nrfconnect/ncs-pluto
835835
/tests/drivers/flash_patch/ @nrfconnect/ncs-pluto
836836
/tests/drivers/fprotect/ @nrfconnect/ncs-pluto
837+
/tests/drivers/i2c/i2c_bme688/ @nrfconnect/ncs-low-level-test
837838
/tests/drivers/lpuart/ @nordic-krch
838839
/tests/drivers/nrfx_integration_test/ @nrfconnect/ncs-co-drivers
839840
/tests/drivers/pwm/gpio_loopback/ @nrfconnect/ncs-low-level-test
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
cmake_minimum_required(VERSION 3.20.0)
8+
9+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
10+
project(i2c_bme688)
11+
12+
FILE(GLOB app_sources $ENV{ZEPHYR_BASE}/tests/drivers/i2c/i2c_bme688/src/*.c)
13+
target_sources(app PRIVATE ${app_sources})

tests/drivers/i2c/i2c_bme688/Kconfig

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
config TEST_I2C_SPEED
8+
int "Select I2C speed used during the test, selectable options are: I2C_SPEED_STANDARD (0x1U), I2C_SPEED_FAST (0x2U), I2C_SPEED_FAST_PLUS (0x3U)"
9+
default 1
10+
11+
source "Kconfig.zephyr"
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. _test_i2c_bme688
2+
3+
I2C bus controller to BME688 sensor test
4+
########################################
5+
6+
This sample extends the same-named Zephyr sample to verify it
7+
with Nordic development kits.
8+
9+
Source code and basic configuration files can be found in the corresponding folder structure in zephyr/tests/drivers/i2c/i2c_bme688.

tests/drivers/i2c/i2c_bme688/prj.conf

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CONFIG_I2C=y
2+
CONFIG_ZTEST=y

scripts/twister/alt/zephyr/tests/drivers/i2c/i2c_bme688/testcase.yaml tests/drivers/i2c/i2c_bme688/testcase.yaml

+12-12
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,32 @@ common:
55
depends_on: i2c
66
harness: ztest
77
tests:
8-
drivers.i2c.bme688_nrf54l:
8+
nrf.extended.drivers.i2c.bme688_nrf54l:
99
filter: not CONFIG_COVERAGE
1010
harness_config:
1111
fixture: pca63565
1212
extra_args:
1313
- SHIELD=pca63565
1414
- SB_CONFIG_VPR_LAUNCHER=y
15-
- vpr_launcher_DTC_OVERLAY_FILE="../../../../nrf/boards/shields/pca63565/boards/nrf54l15dk_nrf54l15_vpr_launcher.overlay"
15+
- vpr_launcher_DTC_OVERLAY_FILE="${ZEPHYR_NRF_MODULE_DIR}/boards/shields/pca63565/boards/nrf54l15dk_nrf54l15_vpr_launcher.overlay"
1616
platform_allow:
1717
- nrf54l15dk/nrf54l15/cpuapp
1818
- nrf54l15dk/nrf54l15/cpuflpr
1919

20-
drivers.i2c.bme688_nrf54l_fast_speed:
20+
nrf.extended.drivers.i2c.bme688_nrf54l_fast_speed:
2121
filter: not CONFIG_COVERAGE
2222
harness_config:
2323
fixture: pca63565
2424
extra_args:
2525
- SHIELD=pca63565
2626
- SB_CONFIG_VPR_LAUNCHER=y
27-
- vpr_launcher_DTC_OVERLAY_FILE="../../../../nrf/boards/shields/pca63565/boards/nrf54l15dk_nrf54l15_vpr_launcher.overlay"
27+
- vpr_launcher_DTC_OVERLAY_FILE="${ZEPHYR_NRF_MODULE_DIR}/boards/shields/pca63565/boards/nrf54l15dk_nrf54l15_vpr_launcher.overlay"
2828
- CONFIG_TEST_I2C_SPEED=2
2929
platform_allow:
3030
- nrf54l15dk/nrf54l15/cpuapp
3131
- nrf54l15dk/nrf54l15/cpuflpr
3232

33-
drivers.i2c.bme688_nrf54l_coverage:
33+
nrf.extended.drivers.i2c.bme688_nrf54l_coverage:
3434
filter: CONFIG_COVERAGE
3535
harness_config:
3636
fixture: pca63565
@@ -39,7 +39,7 @@ tests:
3939
platform_allow:
4040
- nrf54l15dk/nrf54l15/cpuapp
4141

42-
drivers.i2c.bme688_nrf54l_coverage_fast_speed:
42+
nrf.extended.drivers.i2c.bme688_nrf54l_coverage_fast_speed:
4343
filter: CONFIG_COVERAGE
4444
harness_config:
4545
fixture: pca63565
@@ -49,7 +49,7 @@ tests:
4949
platform_allow:
5050
- nrf54l15dk/nrf54l15/cpuapp
5151

52-
drivers.i2c.bme688_nrf54h:
52+
nrf.extended.drivers.i2c.bme688_nrf54h:
5353
filter: not CONFIG_COVERAGE
5454
harness_config:
5555
fixture: pca63566
@@ -61,7 +61,7 @@ tests:
6161
- nrf54h20dk/nrf54h20/cpuapp
6262
- nrf54h20dk/nrf54h20/cpuppr
6363

64-
drivers.i2c.bme688_nrf54h_fast_speed:
64+
nrf.extended.drivers.i2c.bme688_nrf54h_fast_speed:
6565
filter: not CONFIG_COVERAGE
6666
harness_config:
6767
fixture: pca63566
@@ -74,7 +74,7 @@ tests:
7474
- nrf54h20dk/nrf54h20/cpuapp
7575
- nrf54h20dk/nrf54h20/cpuppr
7676

77-
drivers.i2c.bme688_nrf54h_fast_plus_speed:
77+
nrf.extended.drivers.i2c.bme688_nrf54h_fast_plus_speed:
7878
filter: not CONFIG_COVERAGE
7979
harness_config:
8080
fixture: pca63566
@@ -87,7 +87,7 @@ tests:
8787
- nrf54h20dk/nrf54h20/cpuapp
8888
- nrf54h20dk/nrf54h20/cpuppr
8989

90-
drivers.i2c.bme688_nrf54h_coverage:
90+
nrf.extended.drivers.i2c.bme688_nrf54h_coverage:
9191
filter: CONFIG_COVERAGE
9292
harness_config:
9393
fixture: pca63566
@@ -96,7 +96,7 @@ tests:
9696
platform_allow:
9797
- nrf54h20dk/nrf54h20/cpuapp
9898

99-
drivers.i2c.bme688_nrf54h_coverage_fast_speed:
99+
nrf.extended.drivers.i2c.bme688_nrf54h_coverage_fast_speed:
100100
filter: CONFIG_COVERAGE
101101
harness_config:
102102
fixture: pca63566
@@ -106,7 +106,7 @@ tests:
106106
platform_allow:
107107
- nrf54h20dk/nrf54h20/cpuapp
108108

109-
drivers.i2c.bme688_nrf54h_coverage_fast_plus_speed:
109+
nrf.extended.drivers.i2c.bme688_nrf54h_coverage_fast_plus_speed:
110110
filter: CONFIG_COVERAGE
111111
harness_config:
112112
fixture: pca63566

0 commit comments

Comments
 (0)