Files
bootrr/helpers/ensure_lib_firmware
Bjorn Andersson 8390be2bcb ensure_lib_firmware: Use bootrr helper and add timeout
Use bootrr helpers to support waiting for some time for the partition to
appear before giving up. This removes the need for putting an explicit
sleep in the test script.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-03-07 18:32:24 -08:00

20 lines
368 B
Bash
Executable File

#!/bin/sh
source /usr/bin/bootrr
TEST_CASE_ID="$1"
PARTITION=/dev/disk/by-partlabel/userdata
timeout 10 [ -L ${PARTITION} ] || test_report_exit blocked
if [ -d /lib/firmware -o -L /lib/firmware ]; then
test_report_exit skip
fi
mkdir -p /mnt
mount -t ext4 ${PARTITION} /mnt || test_report_exit failed
ln -s /mnt/lib/firmware /lib/firmware
test_report_exit pass