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

Proposed by Alexander Sack
Status: Merged
Merged at revision: 166
Proposed branch: lp:~asac/lava-android-test/helloworld-simple
Merge into: lp:lava-android-test
Diff against target: 42 lines (+38/-0)
1 file modified
lava_android_test/test_definitions/helloworld.py (+38/-0)
To merge this branch: bzr merge lp:~asac/lava-android-test/helloworld-simple
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Needs Fixing
Yongqin Liu Pending
Review via email: mp+110315@code.launchpad.net

Description of the change

attempt to make a simple hello world example that shows how stdoutput in form of test_case_id: PASS|FAIL can be done.

To post a comment you must log in.
Revision history for this message
Alexander Sack (asac) wrote :

not tested... please review and let me know once I can try it out with an android submission.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

IMHO you want to say "echo pass"

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

i started off with iozone.py which doesnt use lowercase either. Either that is broken or PASS should be OK :).

Preview Diff

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

Subscribers

People subscribed via source and target branches