From: Quirin Gylstorff <[email protected]> The total number of errors is easier collected by parsing the LAVA API output as it already contains the information requested. The lavacli output does not contain the sum of errors.
Signed-off-by: Quirin Gylstorff <[email protected]> --- scripts/run-lava-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run-lava-tests.sh b/scripts/run-lava-tests.sh index 44e02fc..7972279 100755 --- a/scripts/run-lava-tests.sh +++ b/scripts/run-lava-tests.sh @@ -81,7 +81,7 @@ url="${api}/${auth}" curl --silent "${url}" -o report.xml # change return code to generate a error in gitlab-ci if a test is failed -number_of_fails="$(lavacli results "${test_id}" | grep -c fail )" +number_of_fails="$(grep -o "errors=\"[0-9]*\"" report.xml | head -1 | cut -d\" -f2 )" if [ -n "${ssh_pid}" ];then kill "${ssh_pid}" -- 2.20.1
