Merge lp://qastaging/~mterry/phablet-tools/unlock into lp://qastaging/phablet-tools

Proposed by Michael Terry
Status: Needs review
Proposed branch: lp://qastaging/~mterry/phablet-tools/unlock
Merge into: lp://qastaging/phablet-tools
Diff against target: 132 lines (+59/-3)
1 file modified
phablet-test-run (+59/-3)
To merge this branch: bzr merge lp://qastaging/~mterry/phablet-tools/unlock
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+217620@code.qastaging.launchpad.net

Commit message

Unlock as part of a test run ourselves (instead of relying on user or ubuntu-test-case scripts to do it)

Description of the change

Unlock as part of a test run ourselves (instead of relying on user or ubuntu-test-case scripts to do it).

This also means we grab the powerd lock ourselves (since we trigger a reboot).

I added a new option -l to turn off this reboot&unlock. I chose l because it felt like "lock" (vs unlock) but am open to a better option. Especially since it doesn't mean that the script locks the phone. But really, such one-letter options can get pretty arbitrary so I didn't stress.

This branch goes hand-in-hand with https://code.launchpad.net/~mterry/ubuntu-test-cases/touch-unlock-device/+merge/215911

To post a comment you must log in.
270. By Michael Terry

Teardown even if killed

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

+ exec_with_adb sh -c "if ! dpkg -s unity8-autopilot >/dev/null 2>/dev/null; then echo 'Installing unity8-autopilot on device for unlock support'; DEBIAN_FRONTEND=noninteractive apt-get -y -q install unity8-autopilot; fi"

Ideally devices should be in read only state for app testing. What I do to get the autopilot modules in phablet-test-click-setup is to grab the installed unity8 versions of the package and grab it's source package (pull-lp-source). We should do something similar here.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Seeding unity8-autopilot is fine as well. We are in definite need of a proper QA story here.

The rest looks fine btw! :-)

Revision history for this message
Michael Terry (mterry) wrote :

Sergio, I think seeding is best bet, since the unlock script uses some python methods installed by the package.

Which branch has the seed config that I need to change?

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

On Tue, Apr 29, 2014 at 4:39 PM, Michael Terry
<email address hidden>wrote:

> Sergio, I think seeding is best bet, since the unlock script uses some
> python methods installed by the package.
>
> Which branch has the seed config that I need to change?
>

For seeding, that's just the regular seed branch:
lp:~ubuntu-core-dev/ubuntu-seeds/ubuntu-touch.utopic

What do you think of splitting the autopilot package into some smaller
bits?

I'm looping in rsalveti and ogra

Revision history for this message
Michael Terry (mterry) wrote :

Oh. I thought you meant some special seeding that the QA images use. No, I'm not a fan of seeding it on all the images...

We could change the unlock script to be more contained -- we could probably duplicate some of the necessary python code.

But doesn't the autopilot scripts do some magic around installing files to /home/phablet/autopilot?

271. By Michael Terry

If we need to, download unity8-autopilot and unpack it manually

272. By Michael Terry

Only override PYTHONPATH if we need to

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote :

OK... I've updated the branch to download a copy of unity8 and use its files (storing the python module in /home/phablet/autopilot). But A) this needs a change on the unity8 side to be able to specify a PYTHONPATH for the unlock-device script. And B) we need to grab the dependencies for unity8-autopilot (like ubuntu-ui-toolkit-autopilot).

I don't want to reinvent the wheel here. Is there already a function somewhere else that nicely puts modules and their dependencies in /home/phablet/autopilot?

As an aside, this is becoming complicated. How does unlocking work today on a readonly device? You'd need the unity8 python module there too. So this must be a solved problem. (And if it isn't, can we not block this change on that feature?)

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

On Wed, Apr 30, 2014 at 5:19 PM, Michael Terry
<email address hidden>wrote:

> OK... I've updated the branch to download a copy of unity8 and use its
> files (storing the python module in /home/phablet/autopilot). But A) this
> needs a change on the unity8 side to be able to specify a PYTHONPATH for
> the unlock-device script. And B) we need to grab the dependencies for
> unity8-autopilot (like ubuntu-ui-toolkit-autopilot).
>
> I don't want to reinvent the wheel here. Is there already a function
> somewhere else that nicely puts modules and their dependencies in
> /home/phablet/autopilot?
>

phablet-click-test-setup does this; that's one of the reasons you can test
click packages on read only images.

>
> As an aside, this is becoming complicated. How does unlocking work today
> on a readonly device? You'd need the unity8 python module there too. So
> this must be a solved problem. (And if it isn't, can we not block this
> change on that feature?)
>

Read only devices don't have unlocking; if you add the TODO, it's fine; I
think it's kind of a failure that we can't have a testing story for a
consumer device though.

273. By Michael Terry

Go back to just assuming readwrite image

274. By Michael Terry

Add TODO note about wanting to support readonly images

Revision history for this message
Michael Terry (mterry) wrote :

OK, I've reverted this branch to the assume-readwrite-image version. I'd really prefer not to bundle all these features together. This change is blocking landing the split greeter, so I'd like to make this as targeted as possible (this set of merges is already taking on another of your wish list items to move the logic out of ubuntu-test-cases into phablet-tools).

I've added a TODO about readonly support. Ready for review.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
275. By Michael Terry

Merge in some changes from Andy Doan that add support for passing on the wait command to unlock-device

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Unmerged revisions

275. By Michael Terry

Merge in some changes from Andy Doan that add support for passing on the wait command to unlock-device

274. By Michael Terry

Add TODO note about wanting to support readonly images

273. By Michael Terry

Go back to just assuming readwrite image

272. By Michael Terry

Only override PYTHONPATH if we need to

271. By Michael Terry

If we need to, download unity8-autopilot and unpack it manually

270. By Michael Terry

Teardown even if killed

269. By Michael Terry

Add unlock support to phablet-test-run

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