Merge lp://staging/~liuyq0307/lava-dispatcher/problems-deploy-android into lp://staging/lava-dispatcher

Proposed by Yongqin Liu
Status: Work in progress
Proposed branch: lp://staging/~liuyq0307/lava-dispatcher/problems-deploy-android
Merge into: lp://staging/lava-dispatcher
Diff against target: 84 lines (+19/-4)
3 files modified
lava_dispatcher/client/targetdevice.py (+6/-0)
lava_dispatcher/config.py (+1/-0)
lava_dispatcher/device/master.py (+12/-4)
To merge this branch: bzr merge lp://staging/~liuyq0307/lava-dispatcher/problems-deploy-android
Reviewer Review Type Date Requested Status
Linaro Validation Team Pending
Review via email: mp+129135@code.staging.launchpad.net

Description of the change

Fix some problems for deploying android image
1. update the source that modify vold.fstab for mounting sdcard
2. the typo for calling hard_reboot method
3. problem when run boot_linaro_android_image without the boot_linaro_android_image action
4. add the rc= to the PS1 of the master image(when the master image is rebooted by pressing the power button or rebooted by hardreset, there will be no rc= in the the PS1 prompt)

To post a comment you must log in.
Revision history for this message
Andy Doan (doanac) wrote :

1) I don't understand that part. It almost looks like its making a change that won't work with old Android builds? Does "/storage/sdcard0" need to become a config value or something?

2) +1

3) Can you explain how you make this happen. The only way I see this being possible is if your job file doesn't include a deploy action? If this is to make unit testing easier, just set target.deployment_data in your python shell or test script

4) Good catch. But why not just always set this rather than waiting for the prompt and timing out. I'd also drop the
 self.proc.sendline('echo "check rc in PS1"')
You'll see that in the job file anyway.

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

> 1) I don't understand that part. It almost looks like its making a change that
> won't work with old Android builds? Does "/storage/sdcard0" need to become a
> config value or something?
Good Idea
> 2) +1
>
> 3) Can you explain how you make this happen. The only way I see this being
> possible is if your job file doesn't include a deploy action? If this is to
> make unit testing easier, just set target.deployment_data in your python shell
> or test script
Usually, I use the following job to boot to the deployed android and do the following test,
this will same me the time to deploy the android:
$ cat /var/www/images/workspace/jobs/reboot.json
{
  "job_name": "reboot",
  "image_type": "android",
  "target": "panda01",
  "timeout": 18000,
  "actions": [
    {
      "command": "boot_linaro_android_image"
    }
  ]
}
$
> 4) Good catch. But why not just always set this rather than waiting for the
> prompt and timing out. I'd also drop the
> self.proc.sendline('echo "check rc in PS1"')
> You'll see that in the job file anyway.
If we don't check, we may get the PS1 like "$PS1 $PS1 [rc=$(echo \$?)]: $PS1 [rc=$(echo \$?)]:".

And about the check, we can use sendline(""), but I'd like to make it more explicitly.

400. By Yongqin Liu

use config for the sdcard mount point path

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Yongqin Liu <email address hidden> writes:

>> 3) Can you explain how you make this happen. The only way I see this being
>> possible is if your job file doesn't include a deploy action? If this is to
>> make unit testing easier, just set target.deployment_data in your python shell
>> or test script
> Usually, I use the following job to boot to the deployed android and do the following test,
> this will same me the time to deploy the android:
> $ cat /var/www/images/workspace/jobs/reboot.json
> {
> "job_name": "reboot",
> "image_type": "android",
> "target": "panda01",
> "timeout": 18000,
> "actions": [
> {
> "command": "boot_linaro_android_image"
> }
> ]
> }

I think we'll need to change this a bit -- maybe create actions like
"assume_android_deployed" and "assume_ubuntu_deployed" that set the
deployment_data appropriately but do not do anything else?

> $
>> 4) Good catch. But why not just always set this rather than waiting for the
>> prompt and timing out. I'd also drop the
>> self.proc.sendline('echo "check rc in PS1"')
>> You'll see that in the job file anyway.
> If we don't check, we may get the PS1 like "$PS1 $PS1 [rc=$(echo
> \$?)]: $PS1 [rc=$(echo \$?)]:".
> And about the check, we can use sendline(""), but I'd like to make it more explicitly.

I'm completely changing how prompts are handled in my prompt-sanity
branch. I hope this part of your branch is no longer needed.

Cheers,
mwh

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

Unmerged revisions

400. By Yongqin Liu

use config for the sdcard mount point path

399. By Yongqin Liu

fix some problems when delopy android image

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