diff options
author | Fathi Boudra <fathi.boudra@linaro.org> | 2014-10-28 16:44:19 +0000 |
---|---|---|
committer | Linaro Code Review <review@review.linaro.org> | 2014-10-28 16:44:19 +0000 |
commit | 069aae0e361571d928384d4493b8c0d0e690c534 (patch) | |
tree | 1bbf839e96b522004a519b958fc95fa1b2bb41fe | |
parent | f45322df8873555c569c0d683a9628b3555219aa (diff) | |
parent | 4c87e46fcdf34a59073c8b9cf7d8e0a7b1b0b7e4 (diff) |
Merge "perf: fixed ubuntu test definition"
-rwxr-xr-x | common/scripts/run-perf-test.sh (renamed from ubuntu/scripts/run-perf-test.sh) | 43 | ||||
-rw-r--r-- | ubuntu/perf.yaml | 25 |
2 files changed, 28 insertions, 40 deletions
diff --git a/ubuntu/scripts/run-perf-test.sh b/common/scripts/run-perf-test.sh index 912dd73..fa57dc5 100755 --- a/ubuntu/scripts/run-perf-test.sh +++ b/common/scripts/run-perf-test.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2012, Linaro Limited. +# Copyright (C) 2012-2014, Linaro Limited. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -16,7 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # Author: Avik Sil <avik.sil@linaro.org> -# +# Author: Milosz Wasilewski <milosz.wasilewski@linaro.org> set -x @@ -26,31 +26,15 @@ if [ `whoami` != 'root' ] ; then exit 1 fi -# Let's assume that only Ubuntu has apt-get... -if [ -e /usr/bin/apt-get ]; then - # Install most appropriate linux-linaro-tools-* package - KERNELVER=`uname -r | cut -f 1 -d'-'` - PKGNAME=`apt-cache search "linux-linaro-tools-$KERNELVER" | head -1 | cut -f 1 -d' '` - PERFBIN_PREFIX="/usr/bin/perf_" - PERFBIN_VER=`uname -r | awk -F '-' '{print $1"-"$2}'` - if [ ! -e $PERFBIN_PREFIX$PERFBIN_VER ]; then - apt-get install --yes $PKGNAME - PERFBIN=`dpkg -L $PKGNAME | grep perf_` - if [ "$PERFBIN" != "$PERFBIN_PREFIX$PERFBIN_VER" ]; then - ln -s $PERFBIN $PERFBIN_PREFIX$PERFBIN_VER - fi - fi -fi - # Test 'perf record' echo "Performing perf record test..." TCID="perf record test" perf record -e cycles -o perf-lava-test.data stress -c 4 -t 10 2>&1 | tee perf-record.log samples=`grep -ao "[0-9]\+[ ]\+samples" perf-record.log| cut -f 1 -d' '` if [ $samples -gt 1 ]; then - echo "$TCID : PASS" + echo "$TCID : pass" else - echo "$TCID : FAIL" + echo "$TCID : fail" fi rm perf-record.log @@ -60,9 +44,9 @@ TCID="perf report test" perf report -i perf-lava-test.data 2>&1 | tee perf-report.log pcnt_samples=`grep -c -e "^[ ]\+[0-9]\+.[0-9]\+%" perf-report.log` if [ $pcnt_samples -gt 1 ]; then - echo "$TCID : PASS" -else - echo "$TCID : FAIL" + echo "$TCID : pass" +else + echo "$TCID : fail" fi rm perf-report.log perf-lava-test.data @@ -71,14 +55,17 @@ echo "Performing perf stat test..." TCID="perf stat test" perf stat -e cycles stress -c 4 -t 10 2>&1 | tee perf-stat.log cycles=`grep -o "[0-9,]\+[ ]\+cycles" perf-stat.log | sed 's/,//g' | cut -f 1 -d' '` -if [ $cycles -gt 1 ]; then - echo "$TCID : PASS" +if [ -z "$cycles" ]; then + echo "$TCID : skip" else - echo "$TCID : FAIL" + if [ $cycles -gt 1 ]; then + echo "$TCID : pass" + else + echo "$TCID : fail" + fi fi rm perf-stat.log # Test 'perf test' echo "Performing 'perf test'..." -TCID="perf test" -perf test 2>&1 | sed -e 's/FAILED!/FAIL/g' -e 's/Ok/PASS/g' -e "s/[ ]\?[0-9]\+:/$TCID -/g" -e 's/:/ :/g' +perf test -v 2>&1 | sed -e 's/FAILED!/fail/g' -e 's/Ok/pass/g' -e 's/:/ :/g' diff --git a/ubuntu/perf.yaml b/ubuntu/perf.yaml index 600efbe..b28af6d 100644 --- a/ubuntu/perf.yaml +++ b/ubuntu/perf.yaml @@ -2,30 +2,31 @@ metadata: name: perf format: "Lava-Test-Shell Test Definition 1.0" description: "Run performance tests (perf)" + maintainer: + - milosz.wasilewski@linaro.org os: - ubuntu scope: - performance devices: - - origen - - snowball - panda - panda-es - - vexpress - - highbank + - vexpress-tc2 + - vexpress-a9 + - beaglebone-black + - ifc6410 install: deps: - - linux-tools - - stress-dbgsym + - linux-tools-3.16 + # perf complains for missing stress symbols but there is no package available + - stress + steps: + - ln -s /usr/bin/perf_3.16 /usr/bin/perf run: steps: - - cd ubuntu/scripts - - sudo bash -x ./run-perf-test.sh + - ./common/scripts/run-perf-test.sh parse: - pattern: "^(?P<test_case_id>perf[\\w\\W]+)\\s+:\\s+(?P<result>\\w+)" - fixupdict: - PASS: pass - FAIL: fail + pattern: "^(?P<test_case_id>[\\w\\s\\'\\,\\:\\*\\&\\>\\-]+)\\s:\\s(?P<result>pass|fail|skip)$" |