Files
bootrr/helpers/assert_driver_present

17 lines
290 B
Plaintext
Raw Permalink Normal View History

#!/bin/sh
. bootrr
TEST_CASE_ID="$1"
DRIVER="$2"
TIMEOUT="${4:-1}"
if [ -z "${TEST_CASE_ID}" -o -z "${DRIVER}" ]; then
echo "Usage: $0 <test-case> <driver> [<timeout>]"
exit 1
fi
timeout ${TIMEOUT} [ -d /sys/bus/*/drivers/"${DRIVER}" ] || test_report_exit fail
test_report_exit pass