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