samples: tests: Fix usb.audio.headset test
The sample was failing twister test with a timeout because there was no pass/fail criteria for it (nothing was tested). The fix adds harness on consolse and some output that can be verified. Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
This commit is contained in:
parent
ce776f0c7e
commit
0fb58735f1
2 changed files with 12 additions and 0 deletions
|
@ -5,3 +5,11 @@ tests:
|
|||
depends_on: usb_device
|
||||
tags: usb
|
||||
platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp
|
||||
harness: console
|
||||
harness_config:
|
||||
type: multi_line
|
||||
ordered: true
|
||||
regex:
|
||||
- "Entered main"
|
||||
- "Found USB Headset Device"
|
||||
- "USB enabled"
|
||||
|
|
|
@ -70,6 +70,8 @@ void main(void)
|
|||
return;
|
||||
}
|
||||
|
||||
LOG_INF("Found USB Headset Device");
|
||||
|
||||
usb_audio_register(hs_dev, &ops);
|
||||
|
||||
ret = usb_enable(NULL);
|
||||
|
@ -77,4 +79,6 @@ void main(void)
|
|||
LOG_ERR("Failed to enable USB");
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_INF("USB enabled");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue