summaryrefslogtreecommitdiff
path: root/ubuntu
diff options
context:
space:
mode:
authorArthur She <arthur.she@linaro.org>2015-07-06 13:50:57 +0800
committerArthur She <arthur.she@linaro.org>2015-07-07 10:03:13 +0800
commit1f86b3de0620055a9c5f39f4ab43b2c0d2078e00 (patch)
treed99188059f1eeb6fde2c16a017fe1256ee0d9c04 /ubuntu
parent08995535249692f408b98238617eb9bb568f3260 (diff)
downloadtest-definitions-pipe-1f86b3de0620055a9c5f39f4ab43b2c0d2078e00.tar.gz
ubuntu/scripts/rt-tests-parser.sh
Correct the test case id in test result and make it work for both Ubuntu and OE. Change-Id: I3f15bb19dfe4681f70ffa8a71d58e8ba0d78ece7
Diffstat (limited to 'ubuntu')
-rw-r--r--ubuntu/pmqtest.yaml2
-rw-r--r--ubuntu/ptsematest.yaml2
-rwxr-xr-xubuntu/scripts/rt-tests-parser.sh28
-rw-r--r--ubuntu/sigwaittest.yaml2
-rw-r--r--ubuntu/svsematest.yaml2
5 files changed, 10 insertions, 26 deletions
diff --git a/ubuntu/pmqtest.yaml b/ubuntu/pmqtest.yaml
index 6cacae0..efc3aaa 100644
--- a/ubuntu/pmqtest.yaml
+++ b/ubuntu/pmqtest.yaml
@@ -28,7 +28,7 @@ params:
run:
steps:
- 'pmqtest -l ${LOOPS} -S | tee result.log'
- - './ubuntu/scripts/rt-tests-parser.sh result.log'
+ - './ubuntu/scripts/rt-tests-parser.sh pmqtest result.log'
- 'lava-test-run-attach result.log'
parse:
diff --git a/ubuntu/ptsematest.yaml b/ubuntu/ptsematest.yaml
index b1fa0fa..b916580 100644
--- a/ubuntu/ptsematest.yaml
+++ b/ubuntu/ptsematest.yaml
@@ -28,7 +28,7 @@ params:
run:
steps:
- 'ptsematest -l ${LOOPS} -t | tee result.log'
- - './ubuntu/scripts/rt-tests-parser.sh result.log'
+ - './ubuntu/scripts/rt-tests-parser.sh ptsematest result.log'
- 'lava-test-run-attach result.log'
parse:
diff --git a/ubuntu/scripts/rt-tests-parser.sh b/ubuntu/scripts/rt-tests-parser.sh
index b5cea6e..e86c931 100755
--- a/ubuntu/scripts/rt-tests-parser.sh
+++ b/ubuntu/scripts/rt-tests-parser.sh
@@ -1,39 +1,23 @@
#!/bin/sh
-LOG=$1
+TESTNAME=$1
+LOG=$2
# Find the last line number which starting with control character
-N=`grep -n "#0:" ${LOG} | tail -n1 | cut -d':' -f1`
-# The rest of lines from #N is the final test result we want
-sed -i "s/\x1b\[[0-9]A//" ${LOG} # Remove the control code
+N=`grep -n "^#1 -> #0" ${LOG} | tail -n1 | cut -d':' -f1`
sed -n "${N},$ p" ${LOG} > tmp.log
-mv tmp.log ${LOG}
-sed "s/.*> //" ${LOG} | sed "s/^#/A/" > tmp.log
-
-grep "CPU" tmp.log > v.log
-grep -v "CPU" tmp.log > res.log
-while read l;
-do
- k="`echo ${l} | cut -d: -f1`"
- v="`echo ${l} | cut -d, -f3|sed 's/^ //'`"
- eval ${k}=${v}
- while read m;
- do
- eval sed -i "s/${k}/\$${k}/" res.log
- done < res.log
-done < v.log
while read l
do
TC="`echo ${l} | cut -d',' -f1`"
- R="`echo ${l} | sed 's/^CPU[0-9]*, //'`"
+ 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 "${TC}_${t}: ${v} usec pass"
+ echo "${TESTNAME} ${TC} (${t}): ${v} usec pass"
done
unset IFS
-done < res.log
+done < tmp.log
diff --git a/ubuntu/sigwaittest.yaml b/ubuntu/sigwaittest.yaml
index 5570cb7..1d42e2f 100644
--- a/ubuntu/sigwaittest.yaml
+++ b/ubuntu/sigwaittest.yaml
@@ -27,7 +27,7 @@ params:
run:
steps:
- 'sigwaittest -l ${LOOPS} -t | tee result.log'
- - './ubuntu/scripts/rt-tests-parser.sh result.log'
+ - './ubuntu/scripts/rt-tests-parser.sh sigwaittest result.log'
- 'lava-test-run-attach result.log'
parse:
diff --git a/ubuntu/svsematest.yaml b/ubuntu/svsematest.yaml
index ca25a7a..c02e79f 100644
--- a/ubuntu/svsematest.yaml
+++ b/ubuntu/svsematest.yaml
@@ -28,7 +28,7 @@ params:
run:
steps:
- 'svsematest -l ${LOOPS} -t | tee result.log'
- - './ubuntu/scripts/rt-tests-parser.sh result.log'
+ - './ubuntu/scripts/rt-tests-parser.sh svsematest result.log'
- 'lava-test-run-attach result.log'
parse: