Merge lp:~mwasilew/lava-test/lava-test-perf into lp:lava-test/0.0

Proposed by Milosz Wasilewski
Status: Rejected
Rejected by: Neil Williams
Proposed branch: lp:~mwasilew/lava-test/lava-test-perf
Merge into: lp:lava-test/0.0
Diff against target: 88 lines (+84/-0)
1 file modified
run-perf-test.sh (+84/-0)
To merge this branch: bzr merge lp:~mwasilew/lava-test/lava-test-perf
Reviewer Review Type Date Requested Status
Tyler Baker Approve
Review via email: mp+168132@code.launchpad.net

Description of the change

Fixed regular expression to match perf test output starting with two digit number.

To post a comment you must log in.
Revision history for this message
Tyler Baker (tyler-baker) wrote :

Approved.

review: Approve
Revision history for this message
Antonio Terceiro (terceiro) wrote :

Hi Milosz,

I'm sorry, but I can't understand this merge proposal.

Compara lava-test (the branch you are proposing to merge to):
http://bazaar.launchpad.net/~linaro-validation/lava-test/trunk/files

To the branch you are proposing to merge from:
http://bazaar.launchpad.net/~mwasilew/lava-test/lava-test-perf/files

lp:lava-test does not look like the right target for this, maybe you
were looking for some other repository?

Revision history for this message
Tyler Baker (tyler-baker) wrote :

I did not realize this was the lava-test repository. It should be the
linaro-maintainers repo, good catch Antonio.

lp:~linaro-maintainers/lava-test/lava-test-perf

On 10 June 2013 12:19, Antonio Terceiro <email address hidden> wrote:

> Hi Milosz,
>
> I'm sorry, but I can't understand this merge proposal.
>
> Compara lava-test (the branch you are proposing to merge to):
> http://bazaar.launchpad.net/~linaro-validation/lava-test/trunk/files
>
> To the branch you are proposing to merge from:
> http://bazaar.launchpad.net/~mwasilew/lava-test/lava-test-perf/files
>
> lp:lava-test does not look like the right target for this, maybe you
> were looking for some other repository?
>
> --
> https://code.launchpad.net/~mwasilew/lava-test/lava-test-perf/+merge/168132
> You are reviewing the proposed merge of
> lp:~mwasilew/lava-test/lava-test-perf into lp:lava-test.
>

--
Tyler Baker
Technical Architect, LAVA
Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog

Revision history for this message
Milosz Wasilewski (mwasilew) wrote :

You're absolutely right. This should go to the branch Tyler pointed.
Now I posted it for the review in the right place. Sorry for the
hassle.

milosz

On 10 June 2013 20:30, Tyler Baker <email address hidden> wrote:
> I did not realize this was the lava-test repository. It should be the
> linaro-maintainers repo, good catch Antonio.
>
> lp:~linaro-maintainers/lava-test/lava-test-perf
>
>
>
> On 10 June 2013 12:19, Antonio Terceiro <email address hidden> wrote:
>>
>> Hi Milosz,
>>
>> I'm sorry, but I can't understand this merge proposal.
>>
>> Compara lava-test (the branch you are proposing to merge to):
>> http://bazaar.launchpad.net/~linaro-validation/lava-test/trunk/files
>>
>> To the branch you are proposing to merge from:
>> http://bazaar.launchpad.net/~mwasilew/lava-test/lava-test-perf/files
>>
>> lp:lava-test does not look like the right target for this, maybe you
>> were looking for some other repository?
>>
>> --
>>
>> https://code.launchpad.net/~mwasilew/lava-test/lava-test-perf/+merge/168132
>> You are reviewing the proposed merge of
>> lp:~mwasilew/lava-test/lava-test-perf into lp:lava-test.
>
>
>
>
> --
> Tyler Baker
> Technical Architect, LAVA
> Linaro.org | Open source software for ARM SoCs
> Follow Linaro: http://www.facebook.com/pages/Linaro
> http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog

Unmerged revisions

9. By Milosz Wasilewski

fixed regular expression

8. By Marcin Juszkiewicz

let's assume that if /usr/bin/apt-get exists then we have Ubuntu

7. By Fathi Boudra

Test that the script is run as root and drop sudo calls.
Use gt operand for comparison (fixes incorrect test results).
Fix bashisms.

6. By Avik Sil

Enhance test output log

5. By Avik Sil

Non-interactive install of linux-linaro-tools-* package

4. By Avik Sil

Install proper linux-linaro-tools-* package

3. By Avik Sil

Add perf record data file

2. By Avik Sil

Fix grep option

1. By Avik Sil

perf test definition for lava-test

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'run-perf-test.sh'
2--- run-perf-test.sh 1970-01-01 00:00:00 +0000
3+++ run-perf-test.sh 2013-06-07 17:22:25 +0000
4@@ -0,0 +1,84 @@
5+#!/bin/sh
6+# Copyright (C) 2012, Linaro Limited.
7+#
8+# This program is free software; you can redistribute it and/or
9+# modify it under the terms of the GNU General Public License
10+# as published by the Free Software Foundation; either version 2
11+# of the License, or (at your option) any later version.
12+#
13+# This program is distributed in the hope that it will be useful,
14+# but WITHOUT ANY WARRANTY; without even the implied warranty of
15+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+# GNU General Public License for more details.
17+#
18+# You should have received a copy of the GNU General Public License
19+# along with this program; if not, write to the Free Software
20+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21+#
22+# Author: Avik Sil <avik.sil@linaro.org>
23+#
24+
25+set -x
26+
27+# Test user id
28+if [ `whoami` != 'root' ] ; then
29+ echo "You must be the superuser to run this script" >&2
30+ exit 1
31+fi
32+
33+# Let's assume that only Ubuntu has apt-get...
34+if [ -e /usr/bin/apt-get ]; then
35+ # Install most appropriate linux-linaro-tools-* package
36+ KERNELVER=`uname -r | cut -f 1 -d'-'`
37+ PKGNAME=`apt-cache search "linux-linaro-tools-$KERNELVER" | head -1 | cut -f 1 -d' '`
38+ PERFBIN_PREFIX="/usr/bin/perf_"
39+ PERFBIN_VER=`uname -r | awk -F '-' '{print $1"-"$2}'`
40+ if [ ! -e $PERFBIN_PREFIX$PERFBIN_VER ]; then
41+ apt-get install --yes $PKGNAME
42+ PERFBIN=`dpkg -L $PKGNAME | grep perf_`
43+ if [ "$PERFBIN" != "$PERFBIN_PREFIX$PERFBIN_VER" ]; then
44+ ln -s $PERFBIN $PERFBIN_PREFIX$PERFBIN_VER
45+ fi
46+ fi
47+fi
48+
49+# Test 'perf record'
50+echo "Performing perf record test..."
51+TCID="perf record test"
52+perf record -e cycles -o perf-lava-test.data stress -c 4 -t 10 2>&1 | tee perf-record.log
53+samples=`grep -ao "[0-9]\+[ ]\+samples" perf-record.log| cut -f 1 -d' '`
54+if [ $samples -gt 1 ]; then
55+ echo "$TCID : PASS"
56+else
57+ echo "$TCID : FAIL"
58+fi
59+rm perf-record.log
60+
61+# Test 'perf report'
62+echo "Performing perf report test..."
63+TCID="perf report test"
64+perf report -i perf-lava-test.data 2>&1 | tee perf-report.log
65+pcnt_samples=`grep -c -e "^[ ]\+[0-9]\+.[0-9]\+%" perf-report.log`
66+if [ $pcnt_samples -gt 1 ]; then
67+ echo "$TCID : PASS"
68+else
69+ echo "$TCID : FAIL"
70+fi
71+rm perf-report.log perf-lava-test.data
72+
73+# Test 'perf stat'
74+echo "Performing perf stat test..."
75+TCID="perf stat test"
76+perf stat -e cycles stress -c 4 -t 10 2>&1 | tee perf-stat.log
77+cycles=`grep -o "[0-9,]\+[ ]\+cycles" perf-stat.log | sed 's/,//g' | cut -f 1 -d' '`
78+if [ $cycles -gt 1 ]; then
79+ echo "$TCID : PASS"
80+else
81+ echo "$TCID : FAIL"
82+fi
83+rm perf-stat.log
84+
85+# Test 'perf test'
86+echo "Performing 'perf test'..."
87+TCID="perf test"
88+perf test 2>&1 | sed -e 's/FAILED!/FAIL/g' -e 's/Ok/PASS/g' -e "s/[ ]\?[0-9]\+:/$TCID -/g" -e 's/:/ :/g'

Subscribers

People subscribed via source and target branches