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

Proposed by Kejun ZHOU
Status: Merged
Merged at revision: 171
Proposed branch: lp:~kejun-zhou/lava-android-test/ime
Merge into: lp:lava-android-test
Diff against target: 83 lines (+64/-0) (has conflicts)
3 files modified
MANIFEST.in (+4/-0)
lava_android_test/test_definitions/ime.py (+47/-0)
lava_android_test/test_definitions/ime/ime_test.sh (+13/-0)
Text conflict in MANIFEST.in
To merge this branch: bzr merge lp:~kejun-zhou/lava-android-test/ime
Reviewer Review Type Date Requested Status
Yongqin Liu Approve
Le Chi Thu Pending
Kejun ZHOU Pending
Review via email: mp+107183@code.launchpad.net

This proposal supersedes a proposal from 2012-05-23.

Description of the change

This test is for checking which input methods are running in the Android system. The test runs the tool /system/bin/ime to show all the input method services.

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

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 : Posted in a previous version of this proposal

also, you should modify MANIFEST.in file

review: Needs Fixing
Revision history for this message
Le Chi Thu (le-chi-thu) wrote : Posted in a previous version of this proposal

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
Revision history for this message
Le Chi Thu (le-chi-thu) wrote : Posted in a previous version of this proposal

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
Revision history for this message
Alexander Sack (asac) wrote :

Kenjun resubmitted, can someone review?

Revision history for this message
Alexander Sack (asac) wrote :

sorry... wrong merge request... ignore my previous comment here.

Revision history for this message
Kejun ZHOU (kejun-zhou) wrote : Posted in a previous version of this proposal

The MANIFEST.in had been modify at 2012-04-26 03:16:07 UTC

include lava_android_test/test_definitions/gatortest/*
+include lava_android_test/test_definitions/ime/*

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

By this line
51 +PATTERN = "^\s*(?P<test_case_id>\w+)=(?P<result>\w+)\s*$"
many lines of the output will be matched.
Because the output of "/system/bin/ime list -a" like below:

com.android.inputmethod.latin/.LatinIME:
  mId=com.android.inputmethod.latin/.LatinIME mSettingsActivityName=com.android.inputmethod.latin.Settings
  mIsDefaultResId=0x7f080000
  Service:
    priority=0 preferredOrder=0 match=0x108000 specificIndex=-1 isDefault=false
    ServiceInfo:
      name=com.android.inputmethod.latin.LatinIME
      packageName=com.android.inputmethod.latin
      labelRes=0x7f0b0075 nonLocalizedLabel=null icon=0x0
      enabled=true exported=true processName=com.android.inputmethod.latin
      permission=android.permission.BIND_INPUT_METHOD
      flags=0x0
jp.co.omronsoft.openwnn/.OpenWnnJAJP:
  mId=jp.co.omronsoft.openwnn/.OpenWnnJAJP mSettingsActivityName=jp.co.omronsoft.openwnn.OpenWnnControlPanelJAJP
  mIsDefaultResId=0x0
  Service:
    priority=0 preferredOrder=0 match=0x108000 specificIndex=-1 isDefault=false
    ServiceInfo:
      name=jp.co.omronsoft.openwnn.OpenWnnJAJP
      packageName=jp.co.omronsoft.openwnn
      labelRes=0x0 nonLocalizedLabel=Japanese IME icon=0x0
      enabled=true exported=true processName=jp.co.omronsoft.openwnn
      permission=android.permission.BIND_INPUT_METHOD
      flags=0x0
com.android.inputmethod.pinyin/.PinyinIME:
  mId=com.android.inputmethod.pinyin/.PinyinIME mSettingsActivityName=com.android.inputmethod.pinyin.SettingsActivity
  mIsDefaultResId=0x7f060000
  Service:
    priority=0 preferredOrder=0 match=0x108000 specificIndex=-1 isDefault=false
    ServiceInfo:
      name=com.android.inputmethod.pinyin.PinyinIME
      packageName=com.android.inputmethod.pinyin
      labelRes=0x7f090000 nonLocalizedLabel=null icon=0x0
      enabled=true exported=true processName=com.android.inputmethod.pinyin
      permission=android.permission.BIND_INPUT_METHOD
      flags=0x0
$

Please confirm what is you want.

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*$"

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

Except the conflict in 'MANIFEST.in',
others seems ok for me.
Will resolve the conflict during merge

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'MANIFEST.in'
--- MANIFEST.in 2012-05-24 11:34:49 +0000
+++ MANIFEST.in 2012-05-25 09:08:17 +0000
@@ -7,4 +7,8 @@
7include lava_android_test/test_definitions/cts/*7include lava_android_test/test_definitions/cts/*
8include lava_android_test/test_definitions/glmark2/*8include lava_android_test/test_definitions/glmark2/*
9include lava_android_test/test_definitions/gatortest/*9include lava_android_test/test_definitions/gatortest/*
10<<<<<<< TREE
10include lava_android_test/test_definitions/usbhardware/*11include lava_android_test/test_definitions/usbhardware/*
12=======
13include lava_android_test/test_definitions/ime/*
14>>>>>>> MERGE-SOURCE
1115
=== added directory 'lava_android_test/test_definitions/ime'
=== added file 'lava_android_test/test_definitions/ime.py'
--- lava_android_test/test_definitions/ime.py 1970-01-01 00:00:00 +0000
+++ lava_android_test/test_definitions/ime.py 2012-05-25 09:08:17 +0000
@@ -0,0 +1,47 @@
1# Copyright (c) 2011 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/>.
20import os
21import lava_android_test.testdef
22from lava_android_test.config import get_config
23
24test_name = 'ime'
25config = get_config()
26curdir = os.path.realpath(os.path.dirname(__file__))
27test_sh_name = 'ime_test.sh'
28test_sh_path = os.path.join(curdir, test_name, test_sh_name)
29test_sh_android_path = os.path.join(config.installdir_android,
30 test_name, test_sh_name)
31
32INSTALL_STEPS_ADB_PRE = ['push %s %s ' % (test_sh_path,
33 test_sh_android_path),
34 'shell chmod 777 %s' % test_sh_android_path]
35
36ADB_SHELL_STEPS = [test_sh_android_path]
37PATTERN = "^\s*(?P<test_case_id>ime)=(?P<result>\w+)\s*$"
38
39inst = lava_android_test.testdef.AndroidTestInstaller(
40 steps_adb_pre=INSTALL_STEPS_ADB_PRE)
41run = lava_android_test.testdef.AndroidTestRunner(
42 adbshell_steps=ADB_SHELL_STEPS)
43parser = lava_android_test.testdef.AndroidTestParser(PATTERN)
44testobj = lava_android_test.testdef.AndroidTest(testname=test_name,
45 installer=inst,
46 runner=run,
47 parser=parser)
048
=== added file 'lava_android_test/test_definitions/ime/ime_test.sh'
--- lava_android_test/test_definitions/ime/ime_test.sh 1970-01-01 00:00:00 +0000
+++ lava_android_test/test_definitions/ime/ime_test.sh 2012-05-25 09:08:17 +0000
@@ -0,0 +1,13 @@
1#!/system/bin/sh
2
3test_func(){
4 if [ ! -f /system/bin/ime ]; then
5 echo "ime=fail"
6 exit
7 fi
8
9 /system/bin/ime list -a
10 echo "ime=pass"
11}
12
13test_func

Subscribers

People subscribed via source and target branches