mirror of
https://github.com/linux-msm/bootrr.git
synced 2026-02-25 13:12:03 -08:00
This helper is useful to check if a sysfs attribute is present. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
17 lines
308 B
Bash
Executable File
17 lines
308 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. bootrr
|
|
|
|
TEST_CASE_ID="$1"
|
|
SYSFS_ATTRIBUTE="$2"
|
|
TIMEOUT="${3:-1}"
|
|
|
|
if [ -z "${TEST_CASE_ID}" -o -z "${SYSFS_ATTRIBUTE}" ]; then
|
|
echo "Usage: $0 <test-case-id> <sysfs attribute> [<timeout>]"
|
|
exit 1
|
|
fi
|
|
|
|
timeout ${TIMEOUT} [ -f ${SYSFS_ATTRIBUTE} ] || test_report_exit fail
|
|
|
|
test_report_exit pass
|