Browse Source

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>
pull/86261/head
Pierrick Curt 5 months ago committed by Fabio Baltieri
parent
commit
f63bb9cafa
  1. 1
      samples/sensor/accel_trig/README.rst
  2. 30
      samples/sensor/accel_trig/sample.yaml
  3. 0
      samples/sensor/accel_trig/x_nucleo_iks01a3.overlay

1
samples/sensor/accel_trig/README.rst

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

30
samples/sensor/accel_trig/sample.yaml

@ -35,3 +35,33 @@ tests: @@ -35,3 +35,33 @@ tests:
- SNIPPET=rtt-tracing;rtt-console
platform_allow:
- 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

0
samples/sensor/accel_trig/boards/nrf52dk_nrf52832.overlay → samples/sensor/accel_trig/x_nucleo_iks01a3.overlay

Loading…
Cancel
Save