Merge lp:~kissiel/checkbox/fix-1476237-python-in-testing-shell into lp:checkbox

Proposed by Maciej Kisielewski
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 4106
Merged at revision: 4103
Proposed branch: lp:~kissiel/checkbox/fix-1476237-python-in-testing-shell
Merge into: lp:checkbox
Diff against target: 83 lines (+12/-3)
5 files modified
checkbox-touch/components/QmlConfinedPage.qml (+1/-0)
checkbox-touch/components/QmlNativePage.qml (+1/-0)
checkbox-touch/confinement/plainbox-confined-shell.qml (+2/-1)
plainbox/plainbox/data/qml-shell/plainbox_qml_shell.qml (+2/-1)
plainbox/plainbox/qml_shell/qml_shell.qml (+6/-1)
To merge this branch: bzr merge lp:~kissiel/checkbox/fix-1476237-python-in-testing-shell
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Zygmunt Krynicki (community) Needs Information
Review via email: mp+277694@code.launchpad.net

Description of the change

This MR brings reference to Python qml object to all Qml testing shells. (the entities reposnible for running qml jobs)

29cfeec plainbox:qml_shell: add python to the stand-alone qml shell
6e1b403 plainbox:qml_shell: add python obj. to API of stand-alone shell
6085b9e plainbox:qml_shell: add python obj. to plainbox' qml shell
cd5aec5 checkbox-touch: add python obj. to qml shells in checkbox-touch

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Can you expand on how you intend to use this object. I have some ideas but I'd like to know what yours are.

review: Needs Information
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Exactly what we need, thanks. +1

review: Approve
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

> Can you expand on how you intend to use this object. I have some ideas but I'd
> like to know what yours are.

It's really up to testers' will, I didn't want to introduce any limitations. For many tests this should boild down to:

testingShell.python.imporModule('$test_logic')
var val = testingShell.python.eval('test_logic.foo()')

as this is the simplest way.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'checkbox-touch/components/QmlConfinedPage.qml'
2--- checkbox-touch/components/QmlConfinedPage.qml 2015-09-15 11:07:31 +0000
3+++ checkbox-touch/components/QmlConfinedPage.qml 2015-11-17 14:40:09 +0000
4@@ -46,6 +46,7 @@
5 property string name: "Checkbox-touch qml confined shell"
6 property alias pageStack: qmlNativePage.pageStack
7 property string sessionDir: app.sessionDir
8+ property var python: app.py
9 function getTest() {
10 return test;
11 }
12
13=== modified file 'checkbox-touch/components/QmlNativePage.qml'
14--- checkbox-touch/components/QmlNativePage.qml 2015-09-15 11:07:44 +0000
15+++ checkbox-touch/components/QmlNativePage.qml 2015-11-17 14:40:09 +0000
16@@ -42,6 +42,7 @@
17 property string name: "Checkbox-touch qml shell"
18 property alias pageStack: qmlNativePage.pageStack
19 property string sessionDir: app.sessionDir
20+ property var python: app.py
21 function getTest() {
22 return test;
23 }
24
25=== modified file 'checkbox-touch/confinement/plainbox-confined-shell.qml'
26--- checkbox-touch/confinement/plainbox-confined-shell.qml 2015-10-07 17:04:55 +0000
27+++ checkbox-touch/confinement/plainbox-confined-shell.qml 2015-11-17 14:40:09 +0000
28@@ -33,7 +33,8 @@
29 // information and functionality passed to qml job component
30 property var testingShell: {
31 "name": "Checkbox-touch qml confined shell",
32- "pageStack": pageStack
33+ "pageStack": pageStack,
34+ "python": py
35 }
36 property var activeTransfer;
37
38
39=== modified file 'plainbox/plainbox/data/qml-shell/plainbox_qml_shell.qml'
40--- plainbox/plainbox/data/qml-shell/plainbox_qml_shell.qml 2015-03-10 09:24:08 +0000
41+++ plainbox/plainbox/data/qml-shell/plainbox_qml_shell.qml 2015-11-17 14:40:09 +0000
42@@ -72,7 +72,8 @@
43 // information and functionality passed to qml job component
44 property var testingShell: {
45 "name": "Plainbox qml shell",
46- "pageStack": pageStack
47+ "pageStack": pageStack,
48+ "python": py
49 }
50
51 Arguments {
52
53=== modified file 'plainbox/plainbox/qml_shell/qml_shell.qml'
54--- plainbox/plainbox/qml_shell/qml_shell.qml 2015-03-13 14:21:45 +0000
55+++ plainbox/plainbox/qml_shell/qml_shell.qml 2015-11-17 14:40:09 +0000
56@@ -33,6 +33,7 @@
57 */
58 import QtQuick 2.0
59 import Ubuntu.Components 1.1
60+import io.thp.pyotherside 1.4
61
62 MainView {
63 id: mainView
64@@ -42,7 +43,8 @@
65 // information and functionality passed to qml job component
66 property var testingShell: {
67 "name": "Standalone testing shell",
68- "pageStack": pageStack
69+ "pageStack": pageStack,
70+ "python": py
71 }
72
73 Arguments {
74@@ -54,6 +56,9 @@
75 valueNames: ["PATH"]
76 }
77 }
78+ Python {
79+ id: py
80+ }
81
82 Loader {
83 id: loader

Subscribers

People subscribed via source and target branches