samples: sensor: accel_trig: fix twister tests

Add twister tests for tap detection feature

The overlay must be applied only if the shield x_nucleo_iks01a3
is enabled on board nrf52dk/nrf52832.

Signed-off-by: Pierrick Curt <pierrickcurt@gmail.com>
This commit is contained in:
Pierrick Curt 2025-02-18 13:58:59 +01:00 committed by Fabio Baltieri
commit f63bb9cafa
3 changed files with 31 additions and 0 deletions

View file

@ -41,6 +41,7 @@ You can build it with the following command:
:board: nrf52dk/nrf52832 :board: nrf52dk/nrf52832
:shield: x_nucleo_iks01a3 :shield: x_nucleo_iks01a3
:goals: build :goals: build
:west-args: --extra-dtc-overlay x_nucleo_iks01a3.overlay
:compact: :compact:

View file

@ -35,3 +35,33 @@ tests:
- SNIPPET=rtt-tracing;rtt-console - SNIPPET=rtt-tracing;rtt-console
platform_allow: platform_allow:
- apard32690/max32690/m4 - apard32690/max32690/m4
sample.sensor.accel_trig.shield-tap:
harness: console
tags: sensors
harness_config:
type: one_line
regex:
- "^\\s*[0-9A-Za-z_,+-.]*@[0-9A-Fa-f]* \\[m\/s\\^2\\]: \
\\(\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*\\)$"
extra_args:
- SHIELD=x_nucleo_iks01a3
- EXTRA_DTC_OVERLAY_FILE=x_nucleo_iks01a3.overlay
- CONFIG_SAMPLE_TAP_DETECTION=y
depends_on:
- arduino_i2c
integration_platforms:
- nrf52dk/nrf52832
sample.sensor.accel_trig.generic-tap:
harness: console
filter: dt_compat_enabled("nxp,fxos8700") or dt_compat_enabled("invensense,icm42605") or
dt_compat_enabled("st,iis2dlpc") or dt_compat_enabled("st,lis2dw12")
tags: sensors
harness_config:
type: one_line
regex:
- "^\\s*[0-9A-Za-z_,+-.]*@[0-9A-Fa-f]* \\[m\/s\\^2\\]: \
\\(\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*\\)$"
extra_args:
- CONFIG_SAMPLE_TAP_DETECTION=y
integration_platforms:
- stm32f3_disco