Merge lp://staging/~liuyq0307/lava-android-test/command-file into lp://staging/lava-android-test

Proposed by Yongqin Liu
Status: Superseded
Proposed branch: lp://staging/~liuyq0307/lava-android-test/command-file
Merge into: lp://staging/lava-android-test
Diff against target: 240 lines (+91/-19)
2 files modified
lava_android_test/commands.py (+54/-16)
lava_android_test/testdef.py (+37/-3)
To merge this branch: bzr merge lp://staging/~liuyq0307/lava-android-test/command-file
Reviewer Review Type Date Requested Status
Linaro Validation Team Pending
Review via email: mp+97870@code.staging.launchpad.net

This proposal supersedes a proposal from 2012-03-15.

This proposal has been superseded by a proposal from 2012-03-18.

Description of the change

1. Add support to push a specified android command file to android and run it on android.
2. Add some process for deal with the test result
3. Modify to use add_mutually_exclusive_group according review comment
4. Change result patterns to Parser member, so that we can change them out of the class

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote : Posted in a previous version of this proposal

32 + if self.args.android_command and self.args.command_file:
33 + raise LavaCommandError("Please specified one option of -c and -f")
34 + if not self.args.android_command and not self.args.command_file:
35 + raise LavaCommandError("Please specified one option of -c and -f")

You should use mutex group instead:

group = parser.add_mutually_exclusive_group()
group.add_argument('-f', ...)
group.add_argument('-c', ...)

Then argparse will this check for you.

53 + STEPS_HOST_PRE = ["wget %s -O %s" % (file_url, file_name)]

I'd like us to use python on the host if possible. Downloading stuff with wget eventually means we have no error handling. This can stay as-is but we should look at the problem of how we download anything throughout lava and fix it.

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

+ if self.args.android_command and self.args.command_file:
39 + raise LavaCommandError("Please specified one option of -c and -f")
40 + if not self.args.android_command and not self.args.command_file:
41 + raise LavaCommandError("Please specified one option of -c and -f")

This won't be need if you indicate that both -c and -f are required

add_argument( ..., required=True)

Otherwise looks okay

148. By Yongqin Liu

modify to use the required option according to review comment

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches