In order to enable sample to be run and evaluated in sanitycheck, add a harness_config to validate sample output: - Add "regex" to match on sample output - Add "timeout" to save some time when debugging - Add "ordered" instruction. Since sample is running a while loop test verdict can potentially be computed on previous run output, issuing a wrong status. Last, since sanitycheck regex does not play well them, rework sample to output without parenthesis. Tested on disco_l475_iot1 Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
16 lines
414 B
YAML
16 lines
414 B
YAML
sample:
|
|
name: LSM6DSL accelerometer and gyrometer sensor
|
|
tests:
|
|
sample.sensor.lsm6dsl:
|
|
harness: console
|
|
tags: sensors
|
|
depends_on: lsm6dsl
|
|
timeout: 15
|
|
harness_config:
|
|
type: multi_line
|
|
ordered: true
|
|
regex:
|
|
- "accel x:[-.0-9]* ms/2 y:[-.0-9]* ms/2 z:[-.0-9]* ms/2"
|
|
- "gyro x:[-.0-9]* dps y:[-.0-9]* dps z:[-.0-9]* dps"
|
|
- "loop:[0-9]* trig_cnt:[0-9]*"
|