Skip to content

Commit

Permalink
tests: drivers: i2c: i2c_bme688: Extend upstream sample
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nordic-segl committed Feb 27, 2025
1 parent fd695fc commit 74e1526
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 12 deletions.
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,7 @@
/tests/drivers/flash/flash_rpc/ @nrfconnect/ncs-pluto
/tests/drivers/flash_patch/ @nrfconnect/ncs-pluto
/tests/drivers/fprotect/ @nrfconnect/ncs-pluto
/tests/drivers/i2c/i2c_bme688/ @nrfconnect/ncs-low-level-test
/tests/drivers/lpuart/ @nordic-krch
/tests/drivers/nrfx_integration_test/ @nrfconnect/ncs-co-drivers
/tests/drivers/pwm/gpio_loopback/ @nrfconnect/ncs-low-level-test
Expand Down
13 changes: 13 additions & 0 deletions tests/drivers/i2c/i2c_bme688/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(i2c_bme688)

FILE(GLOB app_sources $ENV{ZEPHYR_BASE}/tests/drivers/i2c/i2c_bme688/src/*.c)
target_sources(app PRIVATE ${app_sources})
11 changes: 11 additions & 0 deletions tests/drivers/i2c/i2c_bme688/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

config TEST_I2C_SPEED
int "Select I2C speed used during the test, selectable options are: I2C_SPEED_STANDARD (0x1U), I2C_SPEED_FAST (0x2U), I2C_SPEED_FAST_PLUS (0x3U)"
default 1

source "Kconfig.zephyr"
3 changes: 3 additions & 0 deletions tests/drivers/i2c/i2c_bme688/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This sample extends the same-named Zephyr sample to verify it with Nordic development kits.

Source code and basic configuration files can be found in the corresponding folder structure in zephyr/tests/drivers/i2c/i2c_bme688.
2 changes: 2 additions & 0 deletions tests/drivers/i2c/i2c_bme688/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_I2C=y
CONFIG_ZTEST=y
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@ common:
depends_on: i2c
harness: ztest
tests:
drivers.i2c.bme688_nrf54l:
nrf.extended.drivers.i2c.bme688_nrf54l:
filter: not CONFIG_COVERAGE
harness_config:
fixture: pca63565
extra_args:
- SHIELD=pca63565
- SB_CONFIG_VPR_LAUNCHER=y
- vpr_launcher_DTC_OVERLAY_FILE="../../../../nrf/boards/shields/pca63565/boards/nrf54l15dk_nrf54l15_vpr_launcher.overlay"
- vpr_launcher_DTC_OVERLAY_FILE="${ZEPHYR_NRF_MODULE_DIR}/boards/shields/pca63565/boards/nrf54l15dk_nrf54l15_vpr_launcher.overlay"
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l15/cpuflpr

drivers.i2c.bme688_nrf54l_fast_speed:
nrf.extended.drivers.i2c.bme688_nrf54l_fast_speed:
filter: not CONFIG_COVERAGE
harness_config:
fixture: pca63565
extra_args:
- SHIELD=pca63565
- SB_CONFIG_VPR_LAUNCHER=y
- vpr_launcher_DTC_OVERLAY_FILE="../../../../nrf/boards/shields/pca63565/boards/nrf54l15dk_nrf54l15_vpr_launcher.overlay"
- vpr_launcher_DTC_OVERLAY_FILE="${ZEPHYR_NRF_MODULE_DIR}/boards/shields/pca63565/boards/nrf54l15dk_nrf54l15_vpr_launcher.overlay"
- CONFIG_TEST_I2C_SPEED=2
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l15dk/nrf54l15/cpuflpr

drivers.i2c.bme688_nrf54l_coverage:
nrf.extended.drivers.i2c.bme688_nrf54l_coverage:
filter: CONFIG_COVERAGE
harness_config:
fixture: pca63565
Expand All @@ -39,7 +39,7 @@ tests:
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp

drivers.i2c.bme688_nrf54l_coverage_fast_speed:
nrf.extended.drivers.i2c.bme688_nrf54l_coverage_fast_speed:
filter: CONFIG_COVERAGE
harness_config:
fixture: pca63565
Expand All @@ -49,7 +49,7 @@ tests:
platform_allow:
- nrf54l15dk/nrf54l15/cpuapp

drivers.i2c.bme688_nrf54h:
nrf.extended.drivers.i2c.bme688_nrf54h:
filter: not CONFIG_COVERAGE
harness_config:
fixture: pca63566
Expand All @@ -61,7 +61,7 @@ tests:
- nrf54h20dk/nrf54h20/cpuapp
- nrf54h20dk/nrf54h20/cpuppr

drivers.i2c.bme688_nrf54h_fast_speed:
nrf.extended.drivers.i2c.bme688_nrf54h_fast_speed:
filter: not CONFIG_COVERAGE
harness_config:
fixture: pca63566
Expand All @@ -74,7 +74,7 @@ tests:
- nrf54h20dk/nrf54h20/cpuapp
- nrf54h20dk/nrf54h20/cpuppr

drivers.i2c.bme688_nrf54h_fast_plus_speed:
nrf.extended.drivers.i2c.bme688_nrf54h_fast_plus_speed:
filter: not CONFIG_COVERAGE
harness_config:
fixture: pca63566
Expand All @@ -87,7 +87,7 @@ tests:
- nrf54h20dk/nrf54h20/cpuapp
- nrf54h20dk/nrf54h20/cpuppr

drivers.i2c.bme688_nrf54h_coverage:
nrf.extended.drivers.i2c.bme688_nrf54h_coverage:
filter: CONFIG_COVERAGE
harness_config:
fixture: pca63566
Expand All @@ -96,7 +96,7 @@ tests:
platform_allow:
- nrf54h20dk/nrf54h20/cpuapp

drivers.i2c.bme688_nrf54h_coverage_fast_speed:
nrf.extended.drivers.i2c.bme688_nrf54h_coverage_fast_speed:
filter: CONFIG_COVERAGE
harness_config:
fixture: pca63566
Expand All @@ -106,7 +106,7 @@ tests:
platform_allow:
- nrf54h20dk/nrf54h20/cpuapp

drivers.i2c.bme688_nrf54h_coverage_fast_plus_speed:
nrf.extended.drivers.i2c.bme688_nrf54h_coverage_fast_plus_speed:
filter: CONFIG_COVERAGE
harness_config:
fixture: pca63566
Expand Down

0 comments on commit 74e1526

Please sign in to comment.