87bb385134
The PR fixes the pwm_led sample: - now test doesn't rely on any specific device name - Logs which are scanned with regex in the test are printed only after a command passes (before failures were not affecting the test verdict) - If 1 sec cycle is not supported appropriate info is printed and won't cause the test to failed - Changed second "Turned off" msg so regex doesn't mix it with the the first one. Fixes #35524 Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
24 lines
641 B
YAML
24 lines
641 B
YAML
sample:
|
|
description: Demonstration of the PWM LED driver
|
|
name: PWM LED sample
|
|
tests:
|
|
sample.drivers.led.led_pwm:
|
|
filter: dt_compat_enabled("pwm-leds")
|
|
tags: LED
|
|
depends_on: pwm
|
|
platform_exclude: reel_board
|
|
timeout: 20
|
|
harness: console
|
|
harness_config:
|
|
type: multi_line
|
|
ordered: true
|
|
regex:
|
|
- "Found device \\S+"
|
|
- "Testing LED \\d+"
|
|
- "Turned on"
|
|
- "Turned off"
|
|
- "Increasing brightness gradually"
|
|
- "Blinking on: 0.1 sec, off: 0.1 sec"
|
|
- "(Blinking on: 1 sec, off: 1 sec|Cycle period not supported)"
|
|
- "Turned off, loop end"
|