From 8390be2bcb826951835abee76eba874ca78a4748 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Wed, 7 Mar 2018 18:09:03 -0800 Subject: [PATCH] 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 --- helpers/ensure_lib_firmware | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/helpers/ensure_lib_firmware b/helpers/ensure_lib_firmware index b8ca349..de1e2fc 100755 --- a/helpers/ensure_lib_firmware +++ b/helpers/ensure_lib_firmware @@ -1,17 +1,11 @@ #!/bin/sh +source /usr/bin/bootrr + TEST_CASE_ID="$1" PARTITION=/dev/disk/by-partlabel/userdata -test_report_exit() { - TEST_RESULT=$1 - lava-test-case ${TEST_CASE_ID} --result ${TEST_RESULT} - exit 0 -} - -if [ \! -L ${PARTITION} ]; then - test_report_exit blocked -fi +timeout 10 [ -L ${PARTITION} ] || test_report_exit blocked if [ -d /lib/firmware -o -L /lib/firmware ]; then test_report_exit skip