diff options
Diffstat (limited to 'common/scripts/rt-tests-parser.sh')
-rwxr-xr-x | common/scripts/rt-tests-parser.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/common/scripts/rt-tests-parser.sh b/common/scripts/rt-tests-parser.sh new file mode 100755 index 0000000..e86c931 --- /dev/null +++ b/common/scripts/rt-tests-parser.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +TESTNAME=$1 +LOG=$2 + +# Find the last line number which starting with control character +N=`grep -n "^#1 -> #0" ${LOG} | tail -n1 | cut -d':' -f1` +sed -n "${N},$ p" ${LOG} > tmp.log + +while read l +do + TC="`echo ${l} | cut -d',' -f1`" + R="`echo ${l} | cut -d',' -f2-`" + IFS=',' + for c in ${R} + do + c="`echo $c|sed 's/^[ ]*//'`" + t="`echo ${c} | cut -d' ' -f1`" + v="`echo ${c} | cut -d' ' -f2`" + echo "${TESTNAME} ${TC} (${t}): ${v} usec pass" + done + unset IFS +done < tmp.log |