From 46f6922cce98c9b9ccb69c2458bf57f9bcfb85b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20G=C5=82=C4=85b?= Date: Thu, 16 May 2024 08:37:26 +0200 Subject: [PATCH] samples: sensor: Use adxl362 and bme688 on nrf54 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add alternative sample configuration for - zephyr/samples/sensor/accel_polling, - zephyr/samples/sensor/bme680. Fix coverage when using alternative configuration for - zephyr/tests/drivers/i2c/i2c_bme688. Enable test execution on nrf54h20dk and nrf54l15pdk. Select hardware based on fixture. Add sensors to DTS with - SHIELD=63565 on nrf54l, - SHIELD=63566 on nrf54h. Signed-off-by: Sebastian Głąb --- .../samples/sensor/accel_polling/sample.yaml | 55 +++++++++++++++++++ .../zephyr/samples/sensor/bme680/sample.yaml | 51 +++++++++++++++++ .../drivers/i2c/i2c_bme688/testcase.yaml | 21 +++++++ 3 files changed, 127 insertions(+) create mode 100644 scripts/twister/alt/zephyr/samples/sensor/accel_polling/sample.yaml create mode 100644 scripts/twister/alt/zephyr/samples/sensor/bme680/sample.yaml diff --git a/scripts/twister/alt/zephyr/samples/sensor/accel_polling/sample.yaml b/scripts/twister/alt/zephyr/samples/sensor/accel_polling/sample.yaml new file mode 100644 index 000000000000..25a80b2bf450 --- /dev/null +++ b/scripts/twister/alt/zephyr/samples/sensor/accel_polling/sample.yaml @@ -0,0 +1,55 @@ +sample: + name: Accelerometer polling sample +common: + depends_on: spi + tags: drivers spi sensors + harness: console + +tests: + sample.sensor.accel_polling.nrf54h: + filter: not CONFIG_COVERAGE + harness_config: + fixture: pca63566 + 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=pca63566 + platform_allow: nrf54h20dk/nrf54h20/cpuapp + + sample.sensor.accel_polling.nrf54h_coverage: + filter: CONFIG_COVERAGE + harness_config: + fixture: pca63566 + 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=pca63566;coverage_support + platform_allow: nrf54h20dk/nrf54h20/cpuapp + + sample.sensor.accel_polling.nrf54l: + filter: not CONFIG_COVERAGE + harness_config: + fixture: pca63565 + 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=pca63565 + platform_allow: nrf54l15pdk/nrf54l15/cpuapp + + sample.sensor.accel_polling.nrf54l_coverage: + filter: CONFIG_COVERAGE + harness_config: + fixture: pca63565 + 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=pca63565;coverage_support + platform_allow: nrf54l15pdk/nrf54l15/cpuapp diff --git a/scripts/twister/alt/zephyr/samples/sensor/bme680/sample.yaml b/scripts/twister/alt/zephyr/samples/sensor/bme680/sample.yaml new file mode 100644 index 000000000000..023161b4606b --- /dev/null +++ b/scripts/twister/alt/zephyr/samples/sensor/bme680/sample.yaml @@ -0,0 +1,51 @@ +sample: + name: BME680 Sensor sample +common: + depends_on: i2c + tags: drivers i2c sensors + harness: console + +tests: + sample.sensor.bme680.nrf54h: + filter: not CONFIG_COVERAGE + harness_config: + fixture: pca63566 + type: one_line + regex: + - "^\\s*T:\\s*-?[0-9\\.]*; P:\\s*-?[0-9\\.]*; H: \\s*-?[0-9\\.]*; G:\\s*-?[0-9\\.]*$" + extra_args: + - SHIELD=pca63566 + platform_allow: nrf54h20dk/nrf54h20/cpuapp + + sample.sensor.bme680.nrf54h_coverage: + filter: CONFIG_COVERAGE + harness_config: + fixture: pca63566 + type: one_line + regex: + - "^\\s*T:\\s*-?[0-9\\.]*; P:\\s*-?[0-9\\.]*; H: \\s*-?[0-9\\.]*; G:\\s*-?[0-9\\.]*$" + extra_args: + - SHIELD=pca63566;coverage_support + platform_allow: nrf54h20dk/nrf54h20/cpuapp + + sample.sensor.bme680.nrf54l: + filter: not CONFIG_COVERAGE + harness_config: + fixture: pca63565 + type: one_line + regex: + - "^\\s*T:\\s*-?[0-9\\.]*; P:\\s*-?[0-9\\.]*; H: \\s*-?[0-9\\.]*; G:\\s*-?[0-9\\.]*$" + extra_args: + - SHIELD=pca63565 + platform_allow: nrf54l15pdk/nrf54l15/cpuapp + + sample.sensor.bme680.nrf54l_coverage: + filter: CONFIG_COVERAGE + harness_config: + fixture: pca63565 + type: one_line + regex: + - "^\\s*T:\\s*-?[0-9\\.]*; P:\\s*-?[0-9\\.]*; H: \\s*-?[0-9\\.]*; G:\\s*-?[0-9\\.]*$" + extra_args: + - SHIELD=pca63565;coverage_support + platform_allow: nrf54l15pdk/nrf54l15/cpuapp diff --git a/scripts/twister/alt/zephyr/tests/drivers/i2c/i2c_bme688/testcase.yaml b/scripts/twister/alt/zephyr/tests/drivers/i2c/i2c_bme688/testcase.yaml index e2fdc2d6056c..1b6d1f309266 100644 --- a/scripts/twister/alt/zephyr/tests/drivers/i2c/i2c_bme688/testcase.yaml +++ b/scripts/twister/alt/zephyr/tests/drivers/i2c/i2c_bme688/testcase.yaml @@ -4,16 +4,37 @@ common: harness: ztest tests: drivers.i2c.bme688_nrf54l: + filter: not CONFIG_COVERAGE harness_config: fixture: pca63565 extra_args: - SHIELD=pca63565 platform_allow: - nrf54l15pdk/nrf54l15/cpuapp + + drivers.i2c.bme688_nrf54l_coverage: + filter: CONFIG_COVERAGE + harness_config: + fixture: pca63565 + extra_args: + - SHIELD=pca63565;coverage_support + platform_allow: + - nrf54l15pdk/nrf54l15/cpuapp + drivers.i2c.bme688_nrf54h: + filter: not CONFIG_COVERAGE harness_config: fixture: pca63566 extra_args: - SHIELD=pca63566 platform_allow: - nrf54h20dk/nrf54h20/cpuapp + + drivers.i2c.bme688_nrf54h_coverage: + filter: CONFIG_COVERAGE + harness_config: + fixture: pca63566 + extra_args: + - SHIELD=pca63566;coverage_support + platform_allow: + - nrf54h20dk/nrf54h20/cpuapp