Chase Qi | f6eca3d | 2016-08-05 14:58:27 +0800 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | RESULT_FILE="$1" |
| 4 | |
| 5 | while read line; do |
| 6 | if echo "${line}" | egrep -q ".* +(pass|fail|skip)$"; then |
| 7 | test="$(echo "${line}" | awk '{print $1}')" |
| 8 | result="$(echo "${line}" | awk '{print $2}')" |
| 9 | lava-test-case "${test}" --result "${result}" |
| 10 | elif echo "${line}" | egrep -q ".* +(pass|fail|skip) +[0-9.E-]+ [A-Za-z./]+$"; then |
| 11 | test="$(echo "${line}" | awk '{print $1}')" |
| 12 | result="$(echo "${line}" | awk '{print $2}')" |
| 13 | measurement="$(echo "${line}" | awk '{print $3}')" |
| 14 | units="$(echo "${line}" | awk '{print $4}')" |
| 15 | lava-test-case "${test}" --result "${result}" --measurement "${measurement}" --units "${units}" |
| 16 | fi |
| 17 | done < "${RESULT_FILE}" |