~afrantzis/lava-android-test/update-glmark2-pattern

« back to all changes in this revision

Viewing changes to lava_android_test/test_definitions/ime.py

  • Committer: Yongqin Liu
  • Date: 2012-06-19 02:39:56 UTC
  • mfrom: (147.3.5 ime)
  • Revision ID: yongqin.liu@linaro.org-20120619023956-1p21u7vdrxtrbvfd
mergeĀ imeĀ branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (c) 2012 Linaro
 
2
 
 
3
# Author: Linaro Validation Team <linaro-dev@lists.linaro.org>
 
4
#
 
5
# This file is part of LAVA Android Test.
 
6
#
 
7
#
 
8
# This program is free software: you can redistribute it and/or modify
 
9
# it under the terms of the GNU General Public License as published by
 
10
# the Free Software Foundation, either version 3 of the License, or
 
11
# (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, see <http://www.gnu.org/licenses/>.
 
20
import os
 
21
import lava_android_test.testdef
 
22
from lava_android_test.config import get_config
 
23
 
 
24
test_name = 'ime'
 
25
config = get_config()
 
26
curdir = os.path.realpath(os.path.dirname(__file__))
 
27
test_sh_name = 'ime_test.sh'
 
28
test_sh_path = os.path.join(curdir, test_name, test_sh_name)
 
29
test_sh_android_path = os.path.join(config.installdir_android,
 
30
                                    test_name, test_sh_name)
 
31
 
 
32
INSTALL_STEPS_ADB_PRE = ['push %s %s ' % (test_sh_path,
 
33
                                          test_sh_android_path),
 
34
                          'shell chmod 777 %s' % test_sh_android_path]
 
35
 
 
36
ADB_SHELL_STEPS = [test_sh_android_path]
 
37
PATTERN = "^\s*(?P<test_case_id>ime)=(?P<result>\w+)\s*$"
 
38
 
 
39
inst = lava_android_test.testdef.AndroidTestInstaller(
 
40
                                steps_adb_pre=INSTALL_STEPS_ADB_PRE)
 
41
run = lava_android_test.testdef.AndroidTestRunner(
 
42
                                    adbshell_steps=ADB_SHELL_STEPS)
 
43
parser = lava_android_test.testdef.AndroidTestParser(PATTERN)
 
44
testobj = lava_android_test.testdef.AndroidTest(testname=test_name,
 
45
                                    installer=inst,
 
46
                                    runner=run,
 
47
                                    parser=parser)