zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.84k stars 6.6k forks source link

samples/sensor/ for trigger cannot run without trigger #80423

Open FRASTM opened 2 weeks ago

FRASTM commented 2 weeks ago

Describe the bug The PR https://github.com/zephyrproject-rtos/zephyr/pull/77335 added samples to trig accel and magn sensors. It appears that the stm32f3_disco board has both

but has no trigger (no .trigger_set function declared in the sensor_driver_api )

Consequently the samples

are not relevant

To Reproduce

  1. west build -p always -b stm32f3_disco samples/sensor/accel_trig/
  2. west flash
  3. See error

Expected behavior Do not execute this application for this platform even if dt_alias_exists("accel0") or dt_alias_exists("magn0") is true could be in excluding the target in the sample.yaml

Impact CI failure

Logs and console output

*** Booting Zephyr OS build v3.7.0-4635-g3978693d474f ***
Could not set trigger

Environment (please complete the following information):

Additional context one proposal:

diff --git a/samples/sensor/accel_trig/sample.yaml b/samples/sensor/accel_trig/sample.yaml
index 0cdbd066781..a404f5ec887 100644
--- a/samples/sensor/accel_trig/sample.yaml
+++ b/samples/sensor/accel_trig/sample.yaml
@@ -12,3 +12,4 @@ tests:
           \\(\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*\\)$"
     integration_platforms:
       - frdm_k64f                       # fxos8700
+    platform_exclude: stm32f3_disco
diff --git a/samples/sensor/magn_trig/sample.yaml b/samples/sensor/magn_trig/sample.yaml
index 3f010b7099d..f0f808c8fb6 100644
--- a/samples/sensor/magn_trig/sample.yaml
+++ b/samples/sensor/magn_trig/sample.yaml
@@ -12,3 +12,4 @@ tests:
           \\(\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*\\)$"
     integration_platforms:
       - frdm_k64f                       # fxos8700
+    platform_exclude: stm32f3_disco
mmahadevan108 commented 1 week ago

@FRASTM , can you please submit a PR with your proposal.

FRASTM commented 4 days ago

@FRASTM , can you please submit a PR with your proposal.

Here it is : https://github.com/zephyrproject-rtos/zephyr/pull/80842