summaryrefslogtreecommitdiff
path: root/common/scripts
diff options
context:
space:
mode:
authorRavineet Singh <ravineet.singh@linaro.org>2016-01-12 20:31:35 +0100
committerRavineet Singh <ravineet.singh@linaro.org>2016-01-12 20:31:35 +0100
commit5ac580f5b1201e34965ee987904f87680ca180b4 (patch)
tree0dcc585be6cbfd1eea37b45141ef7ca67c531a58 /common/scripts
parentb8b4c26c2b8bbc4f2a4cfaac4ae05c046117e078 (diff)
Ubuntu: moved rt-tests-parser.sh to common, to be used by other OS'es
also updated test definitions pointing to old path. OE: added pmqtest definition Change-Id: Ie9aa8a39fbc4025d477a6368decbe33fa80b94d0 Signed-off-by: Ravineet Singh <ravineet.singh@linaro.org>
Diffstat (limited to 'common/scripts')
-rwxr-xr-xcommon/scripts/rt-tests-parser.sh23
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