Merge lp:~sylvain-pineau/cdts/bug1234674 into lp:cdts

Proposed by Sylvain Pineau
Status: Work in progress
Proposed branch: lp:~sylvain-pineau/cdts/bug1234674
Merge into: lp:cdts
Diff against target: 113 lines (+12/-18)
3 files modified
plainbox-gui/canonical-driver-test-suite/qml/ResumeView.qml (+2/-17)
plainbox-gui/gui-engine/gui-engine.cpp (+9/-1)
plainbox-gui/gui-engine/gui-engine.h (+1/-0)
To merge this branch: bzr merge lp:~sylvain-pineau/cdts/bug1234674
Reviewer Review Type Date Requested Status
Registry Administrators Pending
Review via email: mp+189288@code.launchpad.net

Description of the change

[WORK IN PROGRESS]

a quick and dirty workaround for the linked bug, not fixing the root cause but avoids the SEGFAULT crash.

To post a comment you must log in.

Unmerged revisions

2318. By Sylvain Pineau

ResumeView.qml: Call guiEngine.GuiRestartSession();

In order to refresh PBObjects

2317. By Sylvain Pineau

gui-engine: Fix GuiEngine::CreateSession qDebug location

2316. By Sylvain Pineau

gui-engine: Adds GuiRestartSession() to the API

To do in one shot:

GuiSessionRemove();
RefreshPBObjects();
GuiCreateSession();

2315. By Sylvain Pineau

"automatic merge by tarmac [r=sylvain-pineau][bug=1232171][author=sylvain-pineau]"

2314. By Andrew Haigh

"automatic merge by tarmac [r=roadmr][bug=1232171][author=andrew-haigh-b]"

2313. By Sylvain Pineau

"automatic merge by tarmac [r=roadmr][bug=1231082][author=sylvain-pineau]"

2312. By Sylvain Pineau

"automatic merge by tarmac [r=roadmr][bug=1229192][author=sylvain-pineau]"

2311. By Sylvain Pineau

"automatic merge by tarmac [r=zkrynicki,roadmr][bug=1229194][author=sylvain-pineau]"

2310. By Andrew Haigh

" The gui now uses the metadata property of the SessionState to preserve its progress as it runs through the tests. This is used to determine whether a resumption of previous test state is possible and gives the user the option of doing so. [r=roadmr][bug=1214896,1229897][author=andrew-haigh-b]"

2309. By Zygmunt Krynicki

"automatic merge by tarmac [r=apulido][bug=][author=zkrynicki]"

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plainbox-gui/canonical-driver-test-suite/qml/ResumeView.qml'
--- plainbox-gui/canonical-driver-test-suite/qml/ResumeView.qml 2013-09-23 19:49:56 +0000
+++ plainbox-gui/canonical-driver-test-suite/qml/ResumeView.qml 2013-10-04 12:11:52 +0000
@@ -27,7 +27,6 @@
27Page {27Page {
28 title: i18n.tr("Resume")28 title: i18n.tr("Resume")
2929
30
31 Text {30 Text {
32 id: querylabel31 id: querylabel
33 width: parent.width - units.gu(40)32 width: parent.width - units.gu(40)
@@ -54,20 +53,16 @@
54 }53 }
55 property int buttonWidth: parent.width - units.gu(40)54 property int buttonWidth: parent.width - units.gu(40)
5655
57
58 Button {56 Button {
59 id: rerunButton57 id: rerunButton
60 text: i18n.tr("Rerun last test")58 text: i18n.tr("Rerun last test")
61 width: buttoncol.buttonWidth59 width: buttoncol.buttonWidth
62 color: UbuntuColors.orange60 color: UbuntuColors.orange
63 onClicked: {61 onClicked: {
64
65 // Prepare for the run62 // Prepare for the run
66 guiEngine.GuiResumeSession(true /* re-run last test */);63 guiEngine.GuiResumeSession(true /* re-run last test */);
67
68 // We need this to show the list of stuff64 // We need this to show the list of stuff
69 testitemFactory.CreateTestListModel(testListModel);65 testitemFactory.CreateTestListModel(testListModel);
70
71 mainView.state = "RUNMANAGER"66 mainView.state = "RUNMANAGER"
72 }67 }
73 }68 }
@@ -78,14 +73,10 @@
78 width: buttoncol.buttonWidth73 width: buttoncol.buttonWidth
79 color: UbuntuColors.lightAubergine74 color: UbuntuColors.lightAubergine
80 onClicked: {75 onClicked: {
81
82
83 // Prepare for the run76 // Prepare for the run
84 guiEngine.GuiResumeSession(false /* re-run last test */);77 guiEngine.GuiResumeSession(false /* re-run last test */);
85
86 // We need this to show the list of stuff78 // We need this to show the list of stuff
87 testitemFactory.CreateTestListModel(testListModel);79 testitemFactory.CreateTestListModel(testListModel);
88
89 mainView.state = "RUNMANAGER"80 mainView.state = "RUNMANAGER"
90 }81 }
91 }82 }
@@ -96,16 +87,10 @@
96 width: buttoncol.buttonWidth87 width: buttoncol.buttonWidth
97 color: UbuntuColors.warmGrey88 color: UbuntuColors.warmGrey
98 onClicked: {89 onClicked: {
9990 // Lets clean up the old session and create a fresh one
100 // Lets clean up the old session91 guiEngine.GuiRestartSession();
101 guiEngine.GuiSessionRemove();
102
103 // And create a fresh one
104 guiEngine.GuiCreateSession();
105
106 mainView.state = "WELCOME"92 mainView.state = "WELCOME"
107 }93 }
108 }94 }
109 }95 }
110
111}96}
11297
=== modified file 'plainbox-gui/gui-engine/gui-engine.cpp'
--- plainbox-gui/gui-engine/gui-engine.cpp 2013-09-24 20:39:22 +0000
+++ plainbox-gui/gui-engine/gui-engine.cpp 2013-10-04 12:11:52 +0000
@@ -1224,6 +1224,13 @@
1224 return previous;1224 return previous;
1225}1225}
12261226
1227void GuiEngine::GuiRestartSession(void)
1228{
1229 GuiSessionRemove();
1230 RefreshPBObjects();
1231 GuiCreateSession();
1232}
1233
1227void GuiEngine::GuiCreateSession(void)1234void GuiEngine::GuiCreateSession(void)
1228{1235{
1229 // Create a session and "seed" it with my job list:1236 // Create a session and "seed" it with my job list:
@@ -1294,6 +1301,7 @@
1294{1301{
1295 QDBusObjectPath session;1302 QDBusObjectPath session;
12961303
1304 qDebug("GuiEngine::CreateSession");
1297 QDBusInterface iface(PBBusName, \1305 QDBusInterface iface(PBBusName, \
1298 PBObjectPathName, \1306 PBObjectPathName, \
1299 PBInterfaceName, \1307 PBInterfaceName, \
@@ -1428,7 +1436,7 @@
1428 if (reply.isValid()) {1436 if (reply.isValid()) {
1429 job_list = reply.value();1437 job_list = reply.value();
1430 } else {1438 } else {
1431 qDebug("Failed to CreateSession()");1439 qDebug("Failed to UpdateDesiredJobList()");
1432 }1440 }
14331441
1434 return job_list;1442 return job_list;
14351443
=== modified file 'plainbox-gui/gui-engine/gui-engine.h'
--- plainbox-gui/gui-engine/gui-engine.h 2013-09-24 20:39:22 +0000
+++ plainbox-gui/gui-engine/gui-engine.h 2013-10-04 12:11:52 +0000
@@ -180,6 +180,7 @@
180 // Retrieve all the previous session data180 // Retrieve all the previous session data
181 void GuiResumeSession(const bool re_run);181 void GuiResumeSession(const bool re_run);
182 void GuiCreateSession(void);182 void GuiCreateSession(void);
183 void GuiRestartSession(void);
183184
184public:185public:
185 // Returns a list of all the jobnodes186 // Returns a list of all the jobnodes

Subscribers

People subscribed via source and target branches