Merge lp:~mterry/ubuntu-system-settings/wizard-introspection-rtm into lp:ubuntu-system-settings/rtm-14.09

Proposed by Michael Terry
Status: Rejected
Rejected by: Sebastien Bacher
Proposed branch: lp:~mterry/ubuntu-system-settings/wizard-introspection-rtm
Merge into: lp:ubuntu-system-settings/rtm-14.09
Diff against target: 51 lines (+23/-2)
2 files modified
wizard/main.cpp (+17/-0)
wizard/ubuntu-system-settings-wizard.conf (+6/-2)
To merge this branch: bzr merge lp:~mterry/ubuntu-system-settings/wizard-introspection-rtm
Reviewer Review Type Date Requested Status
Ken VanDine Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+243852@code.launchpad.net

Commit message

Allow autopilot introspection of the wizard.

Description of the change

Allow autopilot introspection of the wizard.

To test this, you can restart the wizard with introspection:

stop ubuntu-system-settings-wizard WIZARD_DONT_RESUME_UNITY=1
start ubuntu-system-settings-wizard QT_LOAD_TESTABILITY=1

And run a simple script like so to verify introspection works:

$ cat test.py
from autopilot.introspection import get_proxy_object_for_existing_process
import sys
print get_proxy_object_for_existing_process(pid=int(sys.argv[1]))
$ python test.py `pidof system-settings-wizard`

== Checklist ==

 * Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)
 Yes

 * Did you build your software in a clean sbuild/pbuilder chroot or ppa?
 Yes

 * Did you build your software in a clean sbuild/pbuilder armhf chroot or ppa?
 Yes

 * Has your component "TestPlan” been executed successfully on emulator, N4?
 Yes

 * Has a 5 minute exploratory testing run been executed on N4?
 Yes

 * If you changed the packaging (debian), did you subscribe a core-dev to this MP?
 NA

 * If you changed the UI, did you subscribe the design-reviewers to this MP?
 NA

 * What components might get impacted by your changes?
 Just wizard

 * Have you requested review by the teams of these owning components?
 Yes

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Great!

review: Approve
Revision history for this message
Sebastien Bacher (seb128) wrote :

seems like we are not doing more rtm landing, so cleaning the list a bit, that one is rather going to be including with the vivid rebase

Unmerged revisions

942. By Michael Terry

Allow testability for the wizard

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'wizard/main.cpp'
2--- wizard/main.cpp 2014-09-22 15:21:10 +0000
3+++ wizard/main.cpp 2014-12-05 18:42:16 +0000
4@@ -48,6 +48,23 @@
5 QGuiApplication::setApplicationName("System Settings Wizard");
6 QGuiApplication *application = new QGuiApplication(argc, (char**)argv);
7
8+ // The testability driver is only loaded by QApplication but not by QGuiApplication.
9+ // However, QApplication depends on QWidget which would add some unneeded overhead => Let's load the testability driver on our own.
10+ if (getenv("QT_LOAD_TESTABILITY")) {
11+ QLibrary testLib(QLatin1String("qttestability"));
12+ if (testLib.load()) {
13+ typedef void (*TasInitialize)(void);
14+ TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init");
15+ if (initFunction) {
16+ initFunction();
17+ } else {
18+ qCritical("Library qttestability resolve failed!");
19+ }
20+ } else {
21+ qCritical("Library qttestability load failed!");
22+ }
23+ }
24+
25 bindtextdomain(I18N_DOMAIN, NULL);
26 textdomain(I18N_DOMAIN);
27
28
29=== modified file 'wizard/ubuntu-system-settings-wizard.conf'
30--- wizard/ubuntu-system-settings-wizard.conf 2014-09-20 00:38:49 +0000
31+++ wizard/ubuntu-system-settings-wizard.conf 2014-12-05 18:42:16 +0000
32@@ -16,7 +16,9 @@
33 else
34 # Stop unity8, we'll start it again in post-stop (this avoids a race
35 # between post-stop and unity8 unpausing)
36- stop --no-wait $JOB
37+ if [ -n "$JOB" ]; then
38+ stop --no-wait $JOB
39+ fi
40
41 # Tell unity-mir to raise SIGSTOP after we start
42 initctl set-env UNITY_MIR_EMITS_SIGSTOP=1
43@@ -71,5 +73,7 @@
44 stop maliit-server || true
45
46 # And finally, resume unity8
47- start --no-wait $JOB || true
48+ if [ -z "$WIZARD_DONT_RESUME_UNITY" ]; then
49+ start --no-wait unity8 || true
50+ fi
51 end script

Subscribers

People subscribed via source and target branches