Merge lp:~kejun-zhou/lava-android-test/ime into lp:lava-android-test

Proposed by Yongqin Liu
Status: Superseded
Proposed branch: lp:~kejun-zhou/lava-android-test/ime
Merge into: lp:lava-android-test
Diff against target: 79 lines (+61/-0)
3 files modified
MANIFEST.in (+1/-0)
lava_android_test/test_definitions/ime.py (+47/-0)
lava_android_test/test_definitions/ime/ime_test.sh (+13/-0)
To merge this branch: bzr merge lp:~kejun-zhou/lava-android-test/ime
Reviewer Review Type Date Requested Status
Le Chi Thu (community) Needs Fixing
Yongqin Liu Needs Fixing
Kejun ZHOU Pending
Review via email: mp+103465@code.launchpad.net

This proposal has been superseded by a proposal from 2012-05-23.

Description of the change

add test script wrapper for input method test

To post a comment you must log in.
Revision history for this message
Yongqin Liu (liuyq0307) wrote :

68 + echo "ime = pass"

this line seems not match the pattern defined in
43 +PATTERN = "^\s*(?P<test_case_id>\w+)=(?P<result>\w+)\s*$"

I think you can change to [echo "ime=pass"]

Revision history for this message
Yongqin Liu (liuyq0307) wrote :

also, you should modify MANIFEST.in file

review: Needs Fixing
lp:~kejun-zhou/lava-android-test/ime updated
149. By Ke Jun ZHOU <dp583@stebjsxu0119>

[update]for inputmethod service

150. By Ke Jun ZHOU <dp583@stebjsxu0119>

update

Revision history for this message
Le Chi Thu (le-chi-thu) wrote :

Please describe the purpose of this test and what the test perform. Which input is required and expect conditions /outputs to detect when the test is pass or not.

echo "ime=unexist" should be echo "ime=fail"

review: Needs Fixing
lp:~kejun-zhou/lava-android-test/ime updated
151. By Ke Jun ZHOU <dp583@stebjsxu0119>

Change the lava_android_test/test_definitions/ime/ime_test.sh
-echo "ime=unexist"
+echo "ime=fail"

Revision history for this message
Le Chi Thu (le-chi-thu) wrote :

Please describe the purpose of this test and what the test perform. Which input is required and expect conditions /outputs to detect when the test is pass or not.

review: Needs Fixing
lp:~kejun-zhou/lava-android-test/ime updated
152. By Ke Jun ZHOU <dp583@stebjsxu0119>

Change imp.py to:
PATTERN = "^\s*(?P<test_case_id>ime)=(?P<result>\w+)\s*$"

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'MANIFEST.in'
2--- MANIFEST.in 2012-03-28 06:41:07 +0000
3+++ MANIFEST.in 2012-05-09 09:44:18 +0000
4@@ -7,3 +7,4 @@
5 include lava_android_test/test_definitions/cts/*
6 include lava_android_test/test_definitions/glmark2/*
7 include lava_android_test/test_definitions/gatortest/*
8+include lava_android_test/test_definitions/ime/*
9
10=== added directory 'lava_android_test/test_definitions/ime'
11=== added file 'lava_android_test/test_definitions/ime.py'
12--- lava_android_test/test_definitions/ime.py 1970-01-01 00:00:00 +0000
13+++ lava_android_test/test_definitions/ime.py 2012-05-09 09:44:18 +0000
14@@ -0,0 +1,47 @@
15+# Copyright (c) 2011 Linaro
16+
17+# Author: Linaro Validation Team <linaro-dev@lists.linaro.org>
18+#
19+# This file is part of LAVA Android Test.
20+#
21+#
22+# This program is free software: you can redistribute it and/or modify
23+# it under the terms of the GNU General Public License as published by
24+# the Free Software Foundation, either version 3 of the License, or
25+# (at your option) any later version.
26+#
27+# This program is distributed in the hope that it will be useful,
28+# but WITHOUT ANY WARRANTY; without even the implied warranty of
29+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30+# GNU General Public License for more details.
31+#
32+# You should have received a copy of the GNU General Public License
33+# along with this program. If not, see <http://www.gnu.org/licenses/>.
34+import os
35+import lava_android_test.testdef
36+from lava_android_test.config import get_config
37+
38+test_name = 'ime'
39+config = get_config()
40+curdir = os.path.realpath(os.path.dirname(__file__))
41+test_sh_name = 'ime_test.sh'
42+test_sh_path = os.path.join(curdir, test_name, test_sh_name)
43+test_sh_android_path = os.path.join(config.installdir_android,
44+ test_name, test_sh_name)
45+
46+INSTALL_STEPS_ADB_PRE = ['push %s %s ' % (test_sh_path,
47+ test_sh_android_path),
48+ 'shell chmod 777 %s' % test_sh_android_path]
49+
50+ADB_SHELL_STEPS = [test_sh_android_path]
51+PATTERN = "^\s*(?P<test_case_id>\w+)=(?P<result>\w+)\s*$"
52+
53+inst = lava_android_test.testdef.AndroidTestInstaller(
54+ steps_adb_pre=INSTALL_STEPS_ADB_PRE)
55+run = lava_android_test.testdef.AndroidTestRunner(
56+ adbshell_steps=ADB_SHELL_STEPS)
57+parser = lava_android_test.testdef.AndroidTestParser(PATTERN)
58+testobj = lava_android_test.testdef.AndroidTest(testname=test_name,
59+ installer=inst,
60+ runner=run,
61+ parser=parser)
62
63=== added file 'lava_android_test/test_definitions/ime/ime_test.sh'
64--- lava_android_test/test_definitions/ime/ime_test.sh 1970-01-01 00:00:00 +0000
65+++ lava_android_test/test_definitions/ime/ime_test.sh 2012-05-09 09:44:18 +0000
66@@ -0,0 +1,13 @@
67+#!/system/bin/sh
68+
69+test_func(){
70+ if [ ! -f /system/bin/ime ]; then
71+ echo "ime=fail"
72+ exit
73+ fi
74+
75+ /system/bin/ime list -a
76+ echo "ime=pass"
77+}
78+
79+test_func

Subscribers

People subscribed via source and target branches