diff --git a/samples/subsys/usb/audio/headphones_microphone/sample.yaml b/samples/subsys/usb/audio/headphones_microphone/sample.yaml index 96825bbeab..c8a5cacb7f 100644 --- a/samples/subsys/usb/audio/headphones_microphone/sample.yaml +++ b/samples/subsys/usb/audio/headphones_microphone/sample.yaml @@ -5,3 +5,12 @@ 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 Headphones Device" + - "Found USB Microphone Device" + - "USB enabled" diff --git a/samples/subsys/usb/audio/headphones_microphone/src/main.c b/samples/subsys/usb/audio/headphones_microphone/src/main.c index 541ad71d14..a560cf4b6a 100644 --- a/samples/subsys/usb/audio/headphones_microphone/src/main.c +++ b/samples/subsys/usb/audio/headphones_microphone/src/main.c @@ -76,11 +76,15 @@ void main(void) return; } + LOG_INF("Found USB Headphones Device"); + if (!mic_dev) { LOG_ERR("Can not get USB Microphone Device"); return; } + LOG_INF("Found USB Microphone Device"); + usb_audio_register(hp_dev, &hp_ops); usb_audio_register(mic_dev, &mic_ops); @@ -90,4 +94,6 @@ void main(void) LOG_ERR("Failed to enable USB"); return; } + + LOG_INF("USB enabled"); }