ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #08836
Re: Programmatically unlocking Unity for testing
On Wed, Jul 2, 2014 at 3:44 AM, Martin Pitt <martin.pitt@xxxxxxxxxx> wrote:
> Hello all,
>
> with autopkgtest now being able to run click tests on the phone [1]
> I'd like to fine-tune the ADB setup script to require less manual
> action.
>
> One outstanding issue is to unlock Unity before starting a test. I
> know the unity8-autopilot package ships a
> /usr/share/unity8/unlock-device script; the setup script could
> certainly download/unpack that package and run the script, but that's
> ugly in several ways:
>
> - The script reboots the phone; surely there is a way to unlock Unity
> without having to do that? This adds a whole minute to
> each test run, and also destroys any other runtime setup that might
> have been done before.
>
I helped move the logic out of phablet-tools into unity8-autopilot. I
wanted to be able to change the script as split greeter landed without
phablet-tools caring about the implementation. And the QA folks seemed
happy to have less unity8 logic in phablet-tools itself too.
Before I messed with it, the scripts were already rebooting before
unlocking. I believe to ensure a clean environment. But with split
greeter, you actually do need a reboot (well technically just a lightdm
restart, but still disruptive). Split greeter will come back at some
point, so I'm hesitant to recommend solutions that will need to change down
the road.
You *can* pass runtime-setup commands to the unlock-device script to be run
after boot with -w.
- Relying on external additional dependencies introduces another
> point of potential breakage.
>
I actually considered that fact that it came from unity8 a benefit, because
phablet-tools doesn't have to care about internals of unity8 greeter setup.
Isn't there something easier which doesn't require all that, like
> changing a configuration value and simply restarting unity itself, or
> sending Unity a D-BUS call?
>
Not today. There is a DBus signal that will slide away the greeter, but
won't actually unlock if you have a password set. So I don't think that's
what you want.
--
-mt
Follow ups
References