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
=== modified file 'checkbox-touch/components/QmlConfinedPage.qml'
--- checkbox-touch/components/QmlConfinedPage.qml 2015-09-15 11:07:31 +0000
+++ checkbox-touch/components/QmlConfinedPage.qml 2015-11-17 14:40:09 +0000
@@ -46,6 +46,7 @@
46 property string name: "Checkbox-touch qml confined shell"46 property string name: "Checkbox-touch qml confined shell"
47 property alias pageStack: qmlNativePage.pageStack47 property alias pageStack: qmlNativePage.pageStack
48 property string sessionDir: app.sessionDir48 property string sessionDir: app.sessionDir
49 property var python: app.py
49 function getTest() {50 function getTest() {
50 return test;51 return test;
51 }52 }
5253
=== modified file 'checkbox-touch/components/QmlNativePage.qml'
--- checkbox-touch/components/QmlNativePage.qml 2015-09-15 11:07:44 +0000
+++ checkbox-touch/components/QmlNativePage.qml 2015-11-17 14:40:09 +0000
@@ -42,6 +42,7 @@
42 property string name: "Checkbox-touch qml shell"42 property string name: "Checkbox-touch qml shell"
43 property alias pageStack: qmlNativePage.pageStack43 property alias pageStack: qmlNativePage.pageStack
44 property string sessionDir: app.sessionDir44 property string sessionDir: app.sessionDir
45 property var python: app.py
45 function getTest() {46 function getTest() {
46 return test;47 return test;
47 }48 }
4849
=== modified file 'checkbox-touch/confinement/plainbox-confined-shell.qml'
--- checkbox-touch/confinement/plainbox-confined-shell.qml 2015-10-07 17:04:55 +0000
+++ checkbox-touch/confinement/plainbox-confined-shell.qml 2015-11-17 14:40:09 +0000
@@ -33,7 +33,8 @@
33 // information and functionality passed to qml job component33 // information and functionality passed to qml job component
34 property var testingShell: {34 property var testingShell: {
35 "name": "Checkbox-touch qml confined shell",35 "name": "Checkbox-touch qml confined shell",
36 "pageStack": pageStack36 "pageStack": pageStack,
37 "python": py
37 }38 }
38 property var activeTransfer;39 property var activeTransfer;
3940
4041
=== modified file 'plainbox/plainbox/data/qml-shell/plainbox_qml_shell.qml'
--- plainbox/plainbox/data/qml-shell/plainbox_qml_shell.qml 2015-03-10 09:24:08 +0000
+++ plainbox/plainbox/data/qml-shell/plainbox_qml_shell.qml 2015-11-17 14:40:09 +0000
@@ -72,7 +72,8 @@
72 // information and functionality passed to qml job component72 // information and functionality passed to qml job component
73 property var testingShell: {73 property var testingShell: {
74 "name": "Plainbox qml shell",74 "name": "Plainbox qml shell",
75 "pageStack": pageStack75 "pageStack": pageStack,
76 "python": py
76 }77 }
7778
78 Arguments {79 Arguments {
7980
=== modified file 'plainbox/plainbox/qml_shell/qml_shell.qml'
--- plainbox/plainbox/qml_shell/qml_shell.qml 2015-03-13 14:21:45 +0000
+++ plainbox/plainbox/qml_shell/qml_shell.qml 2015-11-17 14:40:09 +0000
@@ -33,6 +33,7 @@
33*/33*/
34import QtQuick 2.034import QtQuick 2.0
35import Ubuntu.Components 1.135import Ubuntu.Components 1.1
36import io.thp.pyotherside 1.4
3637
37MainView {38MainView {
38 id: mainView39 id: mainView
@@ -42,7 +43,8 @@
42 // information and functionality passed to qml job component43 // information and functionality passed to qml job component
43 property var testingShell: {44 property var testingShell: {
44 "name": "Standalone testing shell",45 "name": "Standalone testing shell",
45 "pageStack": pageStack46 "pageStack": pageStack,
47 "python": py
46 }48 }
4749
48 Arguments {50 Arguments {
@@ -54,6 +56,9 @@
54 valueNames: ["PATH"]56 valueNames: ["PATH"]
55 }57 }
56 }58 }
59 Python {
60 id: py
61 }
5762
58 Loader {63 Loader {
59 id: loader64 id: loader

Subscribers

People subscribed via source and target branches