Merge lp:~mterry/unity8/unlock-script into lp:unity8

Proposed by Michael Terry
Status: Merged
Approved by: Michael Terry
Approved revision: 784
Merged at revision: 828
Proposed branch: lp:~mterry/unity8/unlock-script
Merge into: lp:unity8
Diff against target: 63 lines (+45/-0)
3 files modified
debian/unity8-autopilot.install (+1/-0)
tools/CMakeLists.txt (+2/-0)
tools/unlock-device (+42/-0)
To merge this branch: bzr merge lp:~mterry/unity8/unlock-script
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Andy Doan (community) Approve
Francis Ginther Needs Fixing
Review via email: mp+212170@code.launchpad.net

Commit message

Provide a all-in-one script for getting a device to an unlocked state.

Description of the change

Provide a all-in-one script for getting a device to an unlocked state.

Our current interface for letting jenkins scripts unlock the greeter is a python method designed to be called from inside the device. But once a split greeter lands, this will no longer be the right abstraction level. Unlocking will require lightdm config changes and a reboot driven from outside the device.

So what I'd like to do is start providing an all-in-one script that jenkins can start calling today. Then my split greeter branch can update the script to do the new correct things, and jenkins doesn't have to care about that change.

So I've just moved some code from mediumtests-runner-touch.sh into an 'unlock-device' script. We can land this; then I can change jenkins to call this new script.

== Checklist ==
 * Are there any related MPs required for this MP to build/function as expected? Please list.
 - No

 * Did you perform an exploratory manual test run of your code change and any related functionality?
 - Yes, ran the script manually for testing.

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
 - I'm in that team, and it was just to install the new file.

 * If you changed the UI, has there been a design review?
 - N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:780
http://jenkins.qa.ubuntu.com/job/unity8-ci/2594/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4148
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3732
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1464
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1115
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1119
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1119/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1115
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3612
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4212
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4212/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3734
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3734/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6042
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5085

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2594/rebuild

review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/unlock-script updated
781. By Michael Terry

Make script look prettier

782. By Michael Terry

Ship script in autopilot package

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:781
http://jenkins.qa.ubuntu.com/job/unity8-ci/2605/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4181
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3765
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1475
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1126
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1130
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1130/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1126
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3636
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4249
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4249/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3767
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3767/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6066
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5125

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2605/rebuild

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

FAILED: Continuous integration, rev:782
http://jenkins.qa.ubuntu.com/job/unity8-ci/2611/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4190
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3774/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1481
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1132
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1136
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1136/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1132
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3643
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4259
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4259/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3776
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3776/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6074/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5135

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2611/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Andy Doan (doanac) wrote :

Can you explain this a little more. I assume to use this you need to:

1) install unity8-autopilot on the host (due to how the script is written)
2) install unity8-autopilot on the target (due to the needs of the script)

or install unity8-autopilot on the target and copy this file to the host?

The script also deals with reboot/retry logic. Personally, I'd just rather the script be completely target based and let CI deal with reboot/retry ugliness. Just have your script exit 0 for success.

Revision history for this message
Francis Ginther (fginther) wrote :

For me, the really important part is the UNLOCK_SCRIPT, I think everything around it can be minimized and allow the other ci infrastructure to manage retries if necessary. So I recommend:

1) Remove the retry logic, just return 0 if the unlock is good, and non-zero otherwise.
2) There's a better way to specify the ANDROID_SERIAL that I found from lp:ubuntu-test-cases/touch

while getopts s: opt; do
        case $opt in
        s)
                export ANDROID_SERIAL=$OPTARG
                ;;
        esac
done

Then just remove the '-s $ANDROID_SERIAL' from the adb calls. If you want to provide some protection when there are multiple devices and a specific one isn't specified you can add:

if [ -z $ANDROID_SERIAL ] ; then
        # ensure we only have one device attached
        lines=$(adb devices | wc -l)
        if [ $lines -gt 3 ] ; then
                echo "ERROR: More than one device attached, please use -s option"
                echo
                usage
                exit 1
        fi
fi

usage() {
        cat <<EOF
usage: $0 [-s ANDROID_SERIAL]

Unlocks unity8

OPTIONS:
  -h Show this message
  -s Specify the serial of the device to unlock

EOF
}

review: Needs Fixing
lp:~mterry/unity8/unlock-script updated
783. By Michael Terry

Review nits

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

@doanac: This script needs unity8-autopilot installed on target for sure. Whether it's installed on host or host just pulls this script from target is up to jenkins.

@fginther: OK, used your ANDROID_SERIAL trick.

@both: I've removed the retry logic, but under protest. The retry logic was presumably introduced due to the vagaries of using autopilot scripting. But that is an implementation detail of this script, not a universal constant. In fact, with the split greeter, we can get to an unlocked state without using autopilot. So no retries should be needed. But no biggie either way. Doesn't hurt to have extra retry logic sitting above this script.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:783
http://jenkins.qa.ubuntu.com/job/unity8-ci/2645/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4289
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/3874
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1515
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1166
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1170
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1170/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1166
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3715
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4374
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4374/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3876
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/3876/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6155
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5261

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2645/rebuild

review: Approve (continuous-integration)
Revision history for this message
Andy Doan (doanac) wrote :

I would still prefer that this be written purely for the target. ie just:

UNLOCK_SCRIPT='
import dbus, logging;
from unity8 import process_helpers as helpers;
logging.basicConfig(level=logging.INFO);
bus = dbus.SystemBus().get_object("com.canonical.powerd", "/com/canonical/powerd");
cookie = bus.requestSysState("unlock-device-hold", 1, dbus_interface="com.canonical.powerd");
helpers.restart_unity_with_testability();
bus.clearSysState(cookie, dbus_interface="com.canonical.powerd");
helpers.unlock_unity()
'

UNLOCK_OUTPUT=$(adb shell "sudo -u phablet -i python3 -c '$UNLOCK_SCRIPT'" 2>&1)
if echo "$UNLOCK_OUTPUT" | grep 'Greeter unlocked' >/dev/null; then
  echo "I: Unlock passed"
  exit 0
else
  echo "I: Unlock failed, script output: '$UNLOCK_OUTPUT'"
  exit 1
fi

You don't want to get into the business of knowing how to reboot a device. We've had to build our own script to make this reliable in CI:

  http://bazaar.launchpad.net/~ubuntu-test-case-dev/ubuntu-test-cases/touch/view/head:/scripts/reboot-and-wait

adb-wait-for-device isn't nearly as friendly as you'd expect it to be. Additionally, we already reboot the device in CI to prep it, so we'd be adding an extra reboot for every test we run.

Revision history for this message
Francis Ginther (fginther) wrote :

Thanks for updating per the review comments.

I hadn't considered the reboot to be a concern in my first review, but I can understand Andy's comment. If you consider the reboot to be necessary for the common case, can you provide a means to disable it via an environment variable or option?

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

Regarding the reboot, adding the reboot to this script is actually the entire point of this merge. Two things:

1) This specific reboot to unlock is already in jenkins's scripts. I'm moving it to this script, and once this lands, we can remove the reboots from jenkins's scripts. So it's not a net increase of reboots. We're just shuffling them around.

2) The reason I want them in this script is because I believe this is the semantically correct place for them; the right abstraction level. I'm trying to prepare for the split greeter feature landing. When that happens, in order to unlock, we will *need* a reboot after making some LightDM config file changes (that is, this script needs to control when the reboot happens, not jenkins). But jenkins shouldn't know about such details. All that jenkins wants is a button to press that says "get my device to an unlocked state." And that's what this script provides. Everything inside this magic black box of a script is implementation details. And the reboot falls into that category.

This reasoning was also my motivation for having the retries in here instead of jenkins. But while I was flexible on that, it doesn't make sense to take the reboot out.

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

(And in case it isn't clear, the split greeter version of this script needs to make a config change, reboot, then delete its config change. So we need this script to be on the host, not the target.)

Revision history for this message
Andy Doan (doanac) wrote :

> Regarding the reboot, adding the reboot to this script is actually the entire
> point of this merge. Two things:
>
> 1) This specific reboot to unlock is already in jenkins's scripts. I'm moving
> it to this script, and once this lands, we can remove the reboots from
> jenkins's scripts. So it's not a net increase of reboots. We're just
> shuffling them around.

Thats fair enough. I'll still have one issue in daily image testing though. After we reboot the device we run a "system-settle" script before unlocking the screen. So with this new approach you are introducing, I need some type of hook around L50:

49 +adb "wait-for-device"
50 +sleep 20
51 +UNLOCK_OUTPUT=$(adb shell "sudo -u phablet -i python3 -c '$UNLOCK_SCRIPT'" 2>&1)

That lets us run system-settle and records if it failed or not.

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

As for system-settle, why do your jenkins scripts need to run it before unlocking? I'm guessing you worry about the system being too loaded to unlock with autopilot? We have the sleep and retries for that, right? Could you just system-settle after unlocking instead of before?

I'm just leery of making this unlock script anything more than a black box. That said, it wouldn't kill me to add a "--settle=command" argument. With a default of "sleep 20" I guess... I'll work on that.

lp:~mterry/unity8/unlock-script updated
784. By Michael Terry

Add -w argument to specify settle command

Revision history for this message
Andy Doan (doanac) wrote :

> As for system-settle, why do your jenkins scripts need to run it before
> unlocking? I'm guessing you worry about the system being too loaded to unlock
> with autopilot? We have the sleep and retries for that, right? Could you
> just system-settle after unlocking instead of before?

My worry is that if system-settle takes too long, the screen will wind up being locked.

> I'm just leery of making this unlock script anything more than a black box.
> That said, it wouldn't kill me to add a "--settle=command" argument. With a
> default of "sleep 20" I guess... I'll work on that.

I understand. We've built up a set of requirements over time that are a bit awkward.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:784
http://jenkins.qa.ubuntu.com/job/unity8-ci/2700/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4424
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/4022
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1570
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1221
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1225
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1225/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1221
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3826
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4528
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4528/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4043
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4043/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/6281
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5486

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2700/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote :

OK, a -w argument has been added. Any other comments or does it look good?

Revision history for this message
Andy Doan (doanac) wrote :

I think its workable. I'm really not a fan of this handling the reboot logic as its going to require us to re-work our harness:

 http://bazaar.launchpad.net/~ubuntu-test-case-dev/ubuntu-test-cases/touch/view/head:/scripts/run-autopilot-tests.sh

notice things like how we grab powerd locks which will now be broken due to the reboot. I understand your points, its just we've had unusual requirements forced on us. I'll need a few days before I can refactor our test harness and be sure things as they do in production.

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

Yeah, I know changing the side effects of unlocking is annoying, sorry.

Note that landing this doesn't mean you have to change tests in lockstep. The existing unlock support via python will continue to work.

But by landing this and then migrating jenkins to this script, everything will "just work" with the split greeter.

Revision history for this message
Andy Doan (doanac) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:784
http://jenkins.qa.ubuntu.com/job/unity8-ci/2744/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-trusty-touch/71
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/4582
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1614
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/1265
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1269
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/1269/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/1265
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/73
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4178
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/4178/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/5709
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/3949
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4700
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/4700/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2744/rebuild

review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/unity8-autopilot.install'
2--- debian/unity8-autopilot.install 2014-01-17 06:50:33 +0000
3+++ debian/unity8-autopilot.install 2014-04-01 14:10:00 +0000
4@@ -1,1 +1,2 @@
5 usr/lib/python*/*/unity*
6+usr/share/unity8/unlock-device
7
8=== modified file 'tools/CMakeLists.txt'
9--- tools/CMakeLists.txt 2013-12-20 15:27:59 +0000
10+++ tools/CMakeLists.txt 2014-04-01 14:10:00 +0000
11@@ -9,3 +9,5 @@
12 install(TARGETS ${SCOPE_TOOL}
13 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
14 )
15+
16+install(FILES unlock-device DESTINATION ${SHELL_APP_DIR})
17
18=== added file 'tools/unlock-device'
19--- tools/unlock-device 1970-01-01 00:00:00 +0000
20+++ tools/unlock-device 2014-04-01 14:10:00 +0000
21@@ -0,0 +1,42 @@
22+#!/bin/bash
23+# -*- Mode: sh; indent-tabs-mode: nil; tab-width: 4 -*-
24+
25+# Our goal here is to get an Ubuntu Touch device into a testable unlocked state.
26+# This will include a reboot.
27+
28+WAIT_COMMAND="sleep 20"
29+
30+while getopts s:w: opt; do
31+ case $opt in
32+ s)
33+ export ANDROID_SERIAL=$OPTARG
34+ ;;
35+ w)
36+ WAIT_COMMAND=$OPTARG
37+ ;;
38+ esac
39+done
40+
41+UNLOCK_SCRIPT='
42+import dbus, logging;
43+from unity8 import process_helpers as helpers;
44+logging.basicConfig(level=logging.INFO);
45+bus = dbus.SystemBus().get_object("com.canonical.powerd", "/com/canonical/powerd");
46+cookie = bus.requestSysState("unlock-device-hold", 1, dbus_interface="com.canonical.powerd");
47+helpers.restart_unity_with_testability();
48+bus.clearSysState(cookie, dbus_interface="com.canonical.powerd");
49+helpers.unlock_unity()
50+'
51+
52+adb reboot
53+sleep 5
54+adb "wait-for-device"
55+eval "$WAIT_COMMAND"
56+UNLOCK_OUTPUT=$(adb shell "sudo -u phablet -i python3 -c '$UNLOCK_SCRIPT'" 2>&1)
57+if echo "$UNLOCK_OUTPUT" | grep 'Greeter unlocked' >/dev/null; then
58+ echo "I: Unlock passed"
59+ exit 0
60+else
61+ echo "I: Unlock failed, script output: '$UNLOCK_OUTPUT'"
62+ exit 1
63+fi

Subscribers

People subscribed via source and target branches