Merge lp:~om26er/unity8/unlocker_fix_non_working_code into lp:unity8

Proposed by Omer Akram
Status: Merged
Approved by: Albert Astals Cid
Approved revision: 524
Merged at revision: 544
Proposed branch: lp:~om26er/unity8/unlocker_fix_non_working_code
Merge into: lp:unity8
Diff against target: 11 lines (+1/-1)
1 file modified
tests/autopilot/unity8/process_helpers.py (+1/-1)
To merge this branch: bzr merge lp:~om26er/unity8/unlocker_fix_non_working_code
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Michał Sawicz Needs Fixing
Christopher Lee (community) Approve
Michael Zanetti (community) Approve
Review via email: mp+194850@code.launchpad.net

Commit message

make the non working code in the screen unlocker helper work

Description of the change

the code which check if the screen was already unlocked was not working because greeter is never None even when it is not shown on screen.

To post a comment you must log in.
Revision history for this message
Omer Akram (om26er) wrote :

I trying to get this change merged for the code to atleast work but I think this part of the code does not make sense.

If the unlocker is to be consumed by our apps their tests will fail because whenever we run a test suite of an app while the screen is unlocked the tests would fail or even if the tests are run with the screen locked after the first test runs every next test will fail since the screen will be unlocked. Instead of raising a warning I think it would make more sense to just use the python logger to log that the screen is already unlocked.

Revision history for this message
Michael Zanetti (mzanetti) wrote :

False is not defined

review: Needs Fixing
Revision history for this message
Michael Zanetti (mzanetti) wrote :

/me stupid... looks good

review: Approve
Revision history for this message
Christopher Lee (veebers) wrote :

Hi Omer,

Good catch with greeter not being None.

WRT raising an exception or logging; My thought process was that someone might want the greeter to be locked and thus would like to be alerted of that.

As it currently stands callers of unlock_unity() can wrap the call in a try..except.
I'm not married to this though and perhaps there is an argument that I'm trying to solve a problem that doesn't exist and that just logging makes the code cleaner and easier then we should change it to just log instead.

review: Approve
Revision history for this message
Omer Akram (om26er) wrote :

> Hi Omer,
>
> Good catch with greeter not being None.
>
> WRT raising an exception or logging; My thought process was that someone might
> want the greeter to be locked and thus would like to be alerted of that.

right, that might be really rare case but in the current form we have multiple problems i.e. only the first test passing and every other after that failing due to screen being unlocked.

>
> As it currently stands callers of unlock_unity() can wrap the call in a
> try..except.

This will result in each app doing exactly the same thing in its code, why not provide a reusable ensure_screen_unlock() ?

> I'm not married to this though and perhaps there is an argument that I'm
> trying to solve a problem that doesn't exist and that just logging makes the
> code cleaner and easier then we should change it to just log instead.

Lets move the conversation over to bug 1250458

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

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/unity8-autolanding/681/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/680
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/667/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/217
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-autolanding/67
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/67
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/67/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-autolanding/67
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/620
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/680
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/680/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/667
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/667/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/3084/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3300/console
    SUCCESS: http://s-jenkins:8080/job/touch-flash-device/1388
    SUCCESS: http://s-jenkins:8080/job/touch-flash-device/1387

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

Re-approving after resolving jenkins config error for generic-mediumtests-runner-mako job.

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 :

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/unity8-autolanding/690/
Executed test runs:
    FAILURE: http://s-jenkins:8080/job/generic-cleanup-mbs/3215/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/741
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/729
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/252
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-autolanding/76
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/76/console
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/76/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-autolanding/76
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/676
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/741
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/741/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/729
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/729/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3358
    SUCCESS: http://s-jenkins:8080/job/touch-flash-device/1447

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

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/unity8-autolanding/707/
Executed test runs:
    SUCCESS: http://s-jenkins:8080/job/generic-cleanup-mbs/3251
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/824
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/812
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/284
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-autolanding/93
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/93
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/93/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-autolanding/93
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/744
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/824
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/824/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/812
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/812/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3423
    SUCCESS: http://s-jenkins:8080/job/touch-flash-device/1512

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

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/unity8-autolanding/720/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/847
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/835
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/300/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-autolanding/106
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/106
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/106/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-autolanding/106
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/764
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/847
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/847/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/835
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/835/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3446
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/1535

review: Needs Fixing (continuous-integration)
Revision history for this message
Omer Akram (om26er) wrote :

wow. Come on.

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

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/unity8-autolanding/726/
Executed test runs:
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/generic-cleanup-mbs/3313
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/889
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/873
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/312
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-autolanding/112
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/112
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/112/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-autolanding/112
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/801
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/889
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/889/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/873
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/873/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3474
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/1563

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

Actually... I'm afraid there's a conflict here...

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

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/unity8-autolanding/741/
Executed test runs:
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/generic-cleanup-mbs/3349
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/931
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/915
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/336
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-autolanding/127
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/127
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/127/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-autolanding/127
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/835
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/931
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/931/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/915
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/915/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3511
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/1602

review: Needs Fixing (continuous-integration)
Revision history for this message
Christopher Lee (veebers) wrote :

The failure in the qmluitests is due to the testDashContents tests causing a segfault.
(You can see this by checking out the console log and searching for 'segmentation fault')

The segfault means that the newly created testDashContent.xml file is never populated with details. The jenkins job then sees this 0-length file and considers it indicative of a failed test and marks the job as UNSTABLE.

I'll just create a bug for this so we can keep track of it . . . here it is: https://bugs.launchpad.net/unity8/+bug/1253483

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

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/unity8-autolanding/745/
Executed test runs:
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/generic-cleanup-mbs/3353
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/938
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/922/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/340
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-autolanding/131
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/131
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/131/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-autolanding/131
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/842
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/938
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/938/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/922
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/922/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3518/console
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/1610

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

PASSED: Continuous integration, rev:524
http://jenkins.qa.ubuntu.com/job/unity8-ci/1686/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/940
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/924
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/342
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/209
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/210
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/210/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/209
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/844
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/940
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/940/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/924
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/924/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3519
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/1611

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

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

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/unity8-autolanding/747/
Executed test runs:
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/generic-cleanup-mbs/3355
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/941
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/925
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/343
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-autolanding/133
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/133
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-autolanding/133/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-autolanding/133
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/845
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/941
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/941/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/925
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/925/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/3520
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/1619

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/unity8/process_helpers.py'
2--- tests/autopilot/unity8/process_helpers.py 2013-11-19 20:53:04 +0000
3+++ tests/autopilot/unity8/process_helpers.py 2013-11-20 16:19:44 +0000
4@@ -67,7 +67,7 @@
5 main_window = MainWindow(unity_proxy_obj)
6
7 greeter = main_window.get_greeter()
8- if greeter is None:
9+ if greeter.created == False:
10 raise RuntimeWarning("Greeter appears to be already unlocked.")
11 greeter.swipe()
12

Subscribers

People subscribed via source and target branches