mirror of
https://github.com/linux-msm/bootrr.git
synced 2026-02-25 13:12:03 -08:00
`command -v` is invoked to check if lava-test-case exists, to know if we need to fake it using `echo`. But in the event that lava-test-case actually exist it also prints the full path of the executable. Pipe the output to /dev/null, as we only care about the exit code. Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
14 lines
275 B
Bash
14 lines
275 B
Bash
#!/bin/sh
|
|
|
|
test_report_exit() {
|
|
TEST_RESULT=$1
|
|
command -v lava-test-case > /dev/null
|
|
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
|
|
}
|
|
|