Files
bootrr/helpers/bootrr
Bjorn Andersson 76a2fde625 helpers/bootrr: Silence the lava-test-case test
`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>
2024-04-21 20:39:55 -07:00

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
}