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
=== added file 'lava_android_test/test_definitions/helloworld.py'
--- lava_android_test/test_definitions/helloworld.py 1970-01-01 00:00:00 +0000
+++ lava_android_test/test_definitions/helloworld.py 2012-06-14 12:53:20 +0000
@@ -0,0 +1,38 @@
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
21import lava_android_test.config
22import lava_android_test.testdef
23
24test_name = 'hello_world'
25
26INSTALL_STEPS_ADB_PRE = []
27ADB_SHELL_STEPS = ['echo hello_world: PASS']
28PATTERN = "^\s*(?P<test_case_id>[^:]*?):\s+(?P<result>(PASS|FAIL)?)\s+-\s+"
29
30inst = lava_android_test.testdef.AndroidTestInstaller(
31 steps_adb_pre=INSTALL_STEPS_ADB_PRE)
32run = lava_android_test.testdef.AndroidTestRunner(
33 adbshell_steps=ADB_SHELL_STEPS)
34parser = lava_android_test.testdef.AndroidTestParser(PATTERN)
35testobj = lava_android_test.testdef.AndroidTest(testname=test_name,
36 installer=inst,
37 runner=run,
38 parser=parser)

Subscribers

People subscribed via source and target branches