summaryrefslogtreecommitdiff
path: root/common/scripts/send-to-lava.sh
diff options
context:
space:
mode:
Diffstat (limited to 'common/scripts/send-to-lava.sh')
-rwxr-xr-xcommon/scripts/send-to-lava.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/common/scripts/send-to-lava.sh b/common/scripts/send-to-lava.sh
new file mode 100755
index 0000000..fd9a40b
--- /dev/null
+++ b/common/scripts/send-to-lava.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+RESULT_FILE="$1"
+
+while read line; do
+ if echo "${line}" | egrep -q ".* +(pass|fail|skip)$"; then
+ test="$(echo "${line}" | awk '{print $1}')"
+ result="$(echo "${line}" | awk '{print $2}')"
+ lava-test-case "${test}" --result "${result}"
+ elif echo "${line}" | egrep -q ".* +(pass|fail|skip) +[0-9.E-]+ [A-Za-z./]+$"; then
+ test="$(echo "${line}" | awk '{print $1}')"
+ result="$(echo "${line}" | awk '{print $2}')"
+ measurement="$(echo "${line}" | awk '{print $3}')"
+ units="$(echo "${line}" | awk '{print $4}')"
+ lava-test-case "${test}" --result "${result}" --measurement "${measurement}" --units "${units}"
+ fi
+done < "${RESULT_FILE}"