~lnxtorez/lava-test/add-pm-qa-definition

« back to all changes in this revision

Viewing changes to abrek/test_definitions/pwrmgmt.py

  • Committer: Paul Larson
  • Date: 2011-02-02 17:40:41 UTC
  • mfrom: (55.1.6 add-pm-qa-definition)
  • Revision ID: paul.larson@canonical.com-20110202174041-fabu8p4y5pr6c67u
Added pwrmgmt test from Torez

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (c) 2010 Linaro
 
2
#
 
3
# This program is free software: you can redistribute it and/or modify
 
4
# it under the terms of the GNU General Public License as published by
 
5
# the Free Software Foundation, either version 3 of the License, or
 
6
# (at your option) any later version.
 
7
#
 
8
# This program is distributed in the hope that it will be useful,
 
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
# GNU General Public License for more details.
 
12
#
 
13
# You should have received a copy of the GNU General Public License
 
14
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 
 
16
import abrek.testdef
 
17
 
 
18
 
 
19
INSTALLSTEPS = ['git clone git://git.linaro.org/people/torez/pm-qa.git',
 
20
                'cd pm-qa && make clean && make all']
 
21
RUNSTEPS = ['cd pm-qa && awk -f testcases.awk  run_template']
 
22
DEPS = ['git-core', 'make']
 
23
 
 
24
pwrmgmtinst = abrek.testdef.AbrekTestInstaller(INSTALLSTEPS, deps=DEPS)
 
25
pwrmgmtrun = abrek.testdef.AbrekTestRunner(RUNSTEPS)
 
26
 
 
27
# test case name is between "pm-qa-"  and  ":"  and results and/or
 
28
# measurements are rest of the line
 
29
PATTERN = "^pm-qa-(?P<test_case_id>\w+):\s+(?P<message>.*)"
 
30
 
 
31
 
 
32
pwrmgmtparser = abrek.testdef.AbrekTestParser(PATTERN,
 
33
    appendall={'result':'pass'})
 
34
 
 
35
testobj = abrek.testdef.AbrekTest(testname="pwrmgmt", installer=pwrmgmtinst,
 
36
                                  runner=pwrmgmtrun, parser=pwrmgmtparser)