samples: basic: blinky_pwm: add testing base on console output
Extend automated testing on HW by veryfing console output. Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
This commit is contained in:
parent
c56134ebff
commit
c9c9c9797f
2 changed files with 11 additions and 1 deletions
|
@ -7,4 +7,13 @@ tests:
|
|||
- drivers
|
||||
- pwm
|
||||
depends_on: pwm
|
||||
harness: led
|
||||
harness: console
|
||||
harness_config:
|
||||
type: multi_line
|
||||
ordered: true
|
||||
regex:
|
||||
- "PWM-based blinky"
|
||||
- "Calibrating for channel [0-9]+"
|
||||
- "Done calibrating; maximum/minimum periods [0-9]+/[0-9]+ nsec"
|
||||
- "Using period [0-9]+"
|
||||
- "Using period [0-9]+"
|
||||
|
|
|
@ -63,6 +63,7 @@ int main(void)
|
|||
printk("Error %d: failed to set pulse width\n", ret);
|
||||
return 0;
|
||||
}
|
||||
printk("Using period %d\n", period);
|
||||
|
||||
period = dir ? (period * 2U) : (period / 2U);
|
||||
if (period > max_period) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue