Skip to content

Commit 46f6922

Browse files
nordic-seglcarlescufi
authored andcommitted
samples: sensor: Use adxl362 and bme688 on nrf54
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 <[email protected]>
1 parent 9b271cd commit 46f6922

File tree

3 files changed

+127
-0
lines changed

3 files changed

+127
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
sample:
2+
name: Accelerometer polling sample
3+
common:
4+
depends_on: spi
5+
tags: drivers spi sensors
6+
harness: console
7+
8+
tests:
9+
sample.sensor.accel_polling.nrf54h:
10+
filter: not CONFIG_COVERAGE
11+
harness_config:
12+
fixture: pca63566
13+
type: one_line
14+
regex:
15+
- "^\\s*[0-9A-Za-z_,+-.]*@[0-9A-Fa-f]* \\[m\/s\\^2\\]: \
16+
\\(\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*\\)$"
17+
extra_args:
18+
- SHIELD=pca63566
19+
platform_allow: nrf54h20dk/nrf54h20/cpuapp
20+
21+
sample.sensor.accel_polling.nrf54h_coverage:
22+
filter: CONFIG_COVERAGE
23+
harness_config:
24+
fixture: pca63566
25+
type: one_line
26+
regex:
27+
- "^\\s*[0-9A-Za-z_,+-.]*@[0-9A-Fa-f]* \\[m\/s\\^2\\]: \
28+
\\(\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*\\)$"
29+
extra_args:
30+
- SHIELD=pca63566;coverage_support
31+
platform_allow: nrf54h20dk/nrf54h20/cpuapp
32+
33+
sample.sensor.accel_polling.nrf54l:
34+
filter: not CONFIG_COVERAGE
35+
harness_config:
36+
fixture: pca63565
37+
type: one_line
38+
regex:
39+
- "^\\s*[0-9A-Za-z_,+-.]*@[0-9A-Fa-f]* \\[m\/s\\^2\\]: \
40+
\\(\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*\\)$"
41+
extra_args:
42+
- SHIELD=pca63565
43+
platform_allow: nrf54l15pdk/nrf54l15/cpuapp
44+
45+
sample.sensor.accel_polling.nrf54l_coverage:
46+
filter: CONFIG_COVERAGE
47+
harness_config:
48+
fixture: pca63565
49+
type: one_line
50+
regex:
51+
- "^\\s*[0-9A-Za-z_,+-.]*@[0-9A-Fa-f]* \\[m\/s\\^2\\]: \
52+
\\(\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*,\\s*-?[0-9\\.]*\\)$"
53+
extra_args:
54+
- SHIELD=pca63565;coverage_support
55+
platform_allow: nrf54l15pdk/nrf54l15/cpuapp
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
sample:
2+
name: BME680 Sensor sample
3+
common:
4+
depends_on: i2c
5+
tags: drivers i2c sensors
6+
harness: console
7+
8+
tests:
9+
sample.sensor.bme680.nrf54h:
10+
filter: not CONFIG_COVERAGE
11+
harness_config:
12+
fixture: pca63566
13+
type: one_line
14+
regex:
15+
- "^\\s*T:\\s*-?[0-9\\.]*; P:\\s*-?[0-9\\.]*; H: \\s*-?[0-9\\.]*; G:\\s*-?[0-9\\.]*$"
16+
extra_args:
17+
- SHIELD=pca63566
18+
platform_allow: nrf54h20dk/nrf54h20/cpuapp
19+
20+
sample.sensor.bme680.nrf54h_coverage:
21+
filter: CONFIG_COVERAGE
22+
harness_config:
23+
fixture: pca63566
24+
type: one_line
25+
regex:
26+
- "^\\s*T:\\s*-?[0-9\\.]*; P:\\s*-?[0-9\\.]*; H: \\s*-?[0-9\\.]*; G:\\s*-?[0-9\\.]*$"
27+
extra_args:
28+
- SHIELD=pca63566;coverage_support
29+
platform_allow: nrf54h20dk/nrf54h20/cpuapp
30+
31+
sample.sensor.bme680.nrf54l:
32+
filter: not CONFIG_COVERAGE
33+
harness_config:
34+
fixture: pca63565
35+
type: one_line
36+
regex:
37+
- "^\\s*T:\\s*-?[0-9\\.]*; P:\\s*-?[0-9\\.]*; H: \\s*-?[0-9\\.]*; G:\\s*-?[0-9\\.]*$"
38+
extra_args:
39+
- SHIELD=pca63565
40+
platform_allow: nrf54l15pdk/nrf54l15/cpuapp
41+
42+
sample.sensor.bme680.nrf54l_coverage:
43+
filter: CONFIG_COVERAGE
44+
harness_config:
45+
fixture: pca63565
46+
type: one_line
47+
regex:
48+
- "^\\s*T:\\s*-?[0-9\\.]*; P:\\s*-?[0-9\\.]*; H: \\s*-?[0-9\\.]*; G:\\s*-?[0-9\\.]*$"
49+
extra_args:
50+
- SHIELD=pca63565;coverage_support
51+
platform_allow: nrf54l15pdk/nrf54l15/cpuapp

scripts/twister/alt/zephyr/tests/drivers/i2c/i2c_bme688/testcase.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,37 @@ common:
44
harness: ztest
55
tests:
66
drivers.i2c.bme688_nrf54l:
7+
filter: not CONFIG_COVERAGE
78
harness_config:
89
fixture: pca63565
910
extra_args:
1011
- SHIELD=pca63565
1112
platform_allow:
1213
- nrf54l15pdk/nrf54l15/cpuapp
14+
15+
drivers.i2c.bme688_nrf54l_coverage:
16+
filter: CONFIG_COVERAGE
17+
harness_config:
18+
fixture: pca63565
19+
extra_args:
20+
- SHIELD=pca63565;coverage_support
21+
platform_allow:
22+
- nrf54l15pdk/nrf54l15/cpuapp
23+
1324
drivers.i2c.bme688_nrf54h:
25+
filter: not CONFIG_COVERAGE
1426
harness_config:
1527
fixture: pca63566
1628
extra_args:
1729
- SHIELD=pca63566
1830
platform_allow:
1931
- nrf54h20dk/nrf54h20/cpuapp
32+
33+
drivers.i2c.bme688_nrf54h_coverage:
34+
filter: CONFIG_COVERAGE
35+
harness_config:
36+
fixture: pca63566
37+
extra_args:
38+
- SHIELD=pca63566;coverage_support
39+
platform_allow:
40+
- nrf54h20dk/nrf54h20/cpuapp

0 commit comments

Comments
 (0)