summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: