mirror of
https://github.com/linux-msm/bootrr.git
synced 2026-02-25 13:12:03 -08:00
In case lava-test-command is not available, emulate what it is supposed to do. This is a convenient hack to make it easier to run bootrr locally for debug/testing purpose. Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
27 lines
388 B
Bash
27 lines
388 B
Bash
#!/bin/sh
|
|
|
|
timeout() {
|
|
attempts="$1"; shift
|
|
cmd="$@"
|
|
|
|
for i in `seq ${attempts}`
|
|
do
|
|
$cmd && return 0
|
|
sleep 1
|
|
done
|
|
|
|
return 1
|
|
}
|
|
|
|
test_report_exit() {
|
|
TEST_RESULT=$1
|
|
command -v lava-test-case
|
|
if [ "$?" -eq 0 ]; then
|
|
lava-test-case ${TEST_CASE_ID} --result ${TEST_RESULT}
|
|
else
|
|
echo "<LAVA_SIGNAL_TESTCASE TEST_CASE_ID=${TEST_CASE_ID} RESULT=${TEST_RESULT}>"
|
|
fi
|
|
exit 0
|
|
}
|
|
|