mirror of
https://github.com/linux-msm/bootrr.git
synced 2026-02-25 13:12:03 -08:00
We might be interested on check if a file is empty or not. One use case is check if the /sys/kernel/debug/devices_deferred file is not empty, in such case mean that a driver is deferred for some reason so probe didn't succeed. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
22 lines
341 B
Bash
Executable File
22 lines
341 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. bootrr
|
|
|
|
TEST_CASE_ID="$1"
|
|
FILEPATH="$2"
|
|
TIMEOUT="${4:-1}"
|
|
|
|
if [ -z "${TEST_CASE_ID}" -o -z "${FILEPATH}" ]; then
|
|
echo "Usage: $0 <test-case-id> <file path> [<timeout>]"
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -e "${FILEPATH}" ]
|
|
then
|
|
test_report_exit skip
|
|
fi
|
|
|
|
timeout ${TIMEOUT} [ -s "${FILEPATH}" ] || test_report_exit pass
|
|
|
|
test_report_exit fail
|