Merge lp:~liuyq0307/lava-android-test/modification-sleep-helloworld into lp:~asac/lava-android-test/helloworld-simple

Proposed by Yongqin Liu on 2012-06-14
Status: Needs review
Proposed branch: lp:~liuyq0307/lava-android-test/modification-sleep-helloworld
Merge into: lp:~asac/lava-android-test/helloworld-simple
Diff against target: 61 lines (+41/-3)
2 files modified
lava_android_test/test_definitions/helloworld.py (+3/-3)
lava_android_test/test_definitions/sleep.py (+38/-0)
To merge this branch: bzr merge lp:~liuyq0307/lava-android-test/modification-sleep-helloworld
Reviewer Review Type Date Requested Status
Andy Doan (community) Approve on 2012-06-14
Alexander Sack 2012-06-14 Pending
Review via email: mp+110352@code.launchpad.net

Description of the change

did some small modification
and add the sleep script here

To post a comment you must log in.
168. By Yongqin Liu on 2012-06-14

modify the pattern error

Alexander Sack (asac) wrote :

looks good.

Alexander Sack (asac) wrote :

would be good to have any type of default ... like one minute.

Andy Doan (doanac) wrote :

i've got an updated branch with this that also includes the ability to have a default option. I'll do the merge.

review: Approve

Unmerged revisions

168. By Yongqin Liu on 2012-06-14

modify the pattern error

167. By Yongqin Liu on 2012-06-14

add some small modification

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lava_android_test/test_definitions/helloworld.py'
2--- lava_android_test/test_definitions/helloworld.py 2012-06-14 12:45:44 +0000
3+++ lava_android_test/test_definitions/helloworld.py 2012-06-14 15:28:17 +0000
4@@ -21,11 +21,11 @@
5 import lava_android_test.config
6 import lava_android_test.testdef
7
8-test_name = 'hello_world'
9+test_name = 'helloworld'
10
11 INSTALL_STEPS_ADB_PRE = []
12-ADB_SHELL_STEPS = ['echo hello_world: PASS']
13-PATTERN = "^\s*(?P<test_case_id>[^:]*?):\s+(?P<result>(PASS|FAIL)?)\s+-\s+"
14+ADB_SHELL_STEPS = ['echo helloworld: PASS']
15+PATTERN = "^\s*(?P<test_case_id>[^:]+?):\s+(?P<result>(PASS|FAIL)?)\s*$"
16
17 inst = lava_android_test.testdef.AndroidTestInstaller(
18 steps_adb_pre=INSTALL_STEPS_ADB_PRE)
19
20=== added file 'lava_android_test/test_definitions/sleep.py'
21--- lava_android_test/test_definitions/sleep.py 1970-01-01 00:00:00 +0000
22+++ lava_android_test/test_definitions/sleep.py 2012-06-14 15:28:17 +0000
23@@ -0,0 +1,38 @@
24+# Copyright (c) 2012 Linaro
25+
26+# Author: Linaro Validation Team <linaro-dev@lists.linaro.org>
27+#
28+# This file is part of LAVA Android Test.
29+#
30+#
31+# This program is free software: you can redistribute it and/or modify
32+# it under the terms of the GNU General Public License as published by
33+# the Free Software Foundation, either version 3 of the License, or
34+# (at your option) any later version.
35+#
36+# This program is distributed in the hope that it will be useful,
37+# but WITHOUT ANY WARRANTY; without even the implied warranty of
38+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39+# GNU General Public License for more details.
40+#
41+# You should have received a copy of the GNU General Public License
42+# along with this program. If not, see <http://www.gnu.org/licenses/>.
43+
44+import lava_android_test.config
45+import lava_android_test.testdef
46+
47+test_name = 'sleep'
48+
49+INSTALL_STEPS_ADB_PRE = []
50+ADB_SHELL_STEPS = ['sleep $(OPTIONS); echo sleep_$(OPTIONS): PASS']
51+PATTERN = "^\s*(?P<test_case_id>[^:]+?):\s+(?P<result>(PASS|FAIL)?)\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)

Subscribers

People subscribed via source and target branches

to all changes: