diff options
author | Arthur She <arthur.she@linaro.org> | 2014-11-28 18:15:36 -0800 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2014-12-02 08:46:29 +0000 |
commit | 9509d817c11e51ea01140ecce105cb573cadd58b (patch) | |
tree | 17153a683cb3758ea439b07cdf9243a9c7b9e041 | |
parent | 8b697e04368a589acc43f4bc21f6dd533a6f1574 (diff) |
Ubuntu: Add pmqtest.yaml
Start pairs of threads and measure the latency of interprocess
communication with POSIX messages queues.
Change-Id: Iab52c118fee1fed9fbcf32cc9e6f9354b474077d
-rw-r--r-- | ubuntu/pmqtest.yaml | 33 | ||||
-rwxr-xr-x | ubuntu/scripts/rt-tests-parser.sh | 39 |
2 files changed, 72 insertions, 0 deletions
diff --git a/ubuntu/pmqtest.yaml b/ubuntu/pmqtest.yaml new file mode 100644 index 0000000..ecd890a --- /dev/null +++ b/ubuntu/pmqtest.yaml @@ -0,0 +1,33 @@ +metadata: + name: pmqtest + format: "Lava-Test-Shell Test Definition 1.0" + description: + "Start pairs of threads and measure the latency of interprocess + communication with POSIX messages queues" + maintainer: + - arthur.she@linaro.org + os: + - ubuntu + devices: + - arndale + - beaglebone-black + - rtsm_fvp_base-aemv8a + scope: + - performance + - preempt-rt + +install: + deps: + - rt-tests + +params: + LOOPS: 1000 + +run: + steps: + - 'pmqtest -l ${LOOPS} -S | tee result.log' + - './ubuntu/scripts/rt-tests-parser.sh result.log' + - 'lava-test-run-attach result.log' + +parse: + pattern: '^(?P<test_case_id>[^:]+):\s*(?P<measurement>[0-9.]+)\s+(?P<units>\w+)\s+(?P<result>pass)' diff --git a/ubuntu/scripts/rt-tests-parser.sh b/ubuntu/scripts/rt-tests-parser.sh new file mode 100755 index 0000000..4d9b1c7 --- /dev/null +++ b/ubuntu/scripts/rt-tests-parser.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +LOG=$1 + +# Find the last line number which starting with control character +N=`grep -Pn "\x1b" ${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 +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]*, //'`" + 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" + done + unset IFS +done < res.log |