Files
bootrr/helpers/assert_soundcard_present
Aníbal Limón 37018e5143 boards/qcom,apq8016-sbc: Add soundcard testing
This test covers check for WCD and HDMI audio driver/devices and check
/proc/asound to ensure soundcard has devices attached.

Common assert_soundcard_present is implemented to check /proc/asound for
soundcards a devices associated with it. In this case 2 Playbacks and 1
Capture device.

Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2021-01-21 08:56:20 -08:00

19 lines
423 B
Bash
Executable File

#!/bin/sh
. bootrr
TEST_CASE_ID="$1"
SOUNDCARD="$2"
DEVICE="$3"
TIMEOUT="${4:-1}"
if [ -z "${TEST_CASE_ID}" -o -z "${SOUNDCARD}" -o -z "${DEVICE}" ]; then
echo "Usage: $0 <test-case-id> <soundcard> <device> [<timeout>]"
exit 1
fi
timeout ${TIMEOUT} [ -d /proc/asound/${SOUNDCARD} ] || test_report_exit fail
timeout ${TIMEOUT} [ -d /proc/asound/${SOUNDCARD}/${DEVICE} ] || test_report_exit fail
test_report_exit pass