Merge lp:~bzoltan/ubuntu-ui-toolkit/landing-03_03 into lp:ubuntu-ui-toolkit

Proposed by Zoltan Balogh
Status: Rejected
Rejected by: Cris Dywan
Proposed branch: lp:~bzoltan/ubuntu-ui-toolkit/landing-03_03
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 329 lines (+66/-30)
16 files modified
components.api (+1/-0)
debian/control (+9/-6)
debian/rules (+1/-0)
debian/ubuntu-ui-toolkit-autopilot.install (+2/-1)
modules/Ubuntu/Components/Panel.qml (+10/-1)
modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml (+2/-1)
run_tests.sh (+2/-2)
tests/autopilot/ubuntuuitoolkit/base.py (+3/-2)
tests/autopilot/ubuntuuitoolkit/emulators.py (+8/-8)
tests/autopilot/ubuntuuitoolkit/fixture_setup.py (+1/-1)
tests/autopilot/ubuntuuitoolkit/tests/test_emulators.py (+4/-1)
tests/autopilot/ubuntuuitoolkit/tests/test_fixture_setup.py (+6/-1)
tests/qmlapicheck.py (+4/-2)
tests/tests.pro (+5/-2)
tests/unit/add_qmlmakecheck.pri (+2/-1)
ubuntu-sdk.pro (+6/-1)
To merge this branch: bzr merge lp:~bzoltan/ubuntu-ui-toolkit/landing-03_03
Reviewer Review Type Date Requested Status
Cris Dywan obsolete Disapprove
PS Jenkins bot continuous-integration Approve
Review via email: mp+209007@code.launchpad.net
To post a comment you must log in.
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 :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Cris Dywan (kalikiana) wrote :
Revision history for this message
Cris Dywan (kalikiana) :
review: Disapprove (obsolete)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components.api'
2--- components.api 2014-02-24 19:16:26 +0000
3+++ components.api 2014-03-03 10:20:32 +0000
4@@ -252,6 +252,7 @@
5 property bool locked
6 property real hintSize
7 property real triggerSize
8+ readonly property real position
9 property bool animate
10 readonly property bool animating
11 property bool __closeOnContentsClicks
12
13=== modified file 'debian/control'
14--- debian/control 2014-03-01 12:51:13 +0000
15+++ debian/control 2014-03-03 10:20:32 +0000
16@@ -6,6 +6,7 @@
17 devscripts,
18 libgles2-mesa-dev,
19 libglib2.0-dev,
20+ python3,
21 python,
22 libqt5qml-graphicaleffects | libqt5graphicaleffects5,
23 qt5-default,
24@@ -22,12 +23,12 @@
25 qtdeclarative5-qtfeedback-plugin,
26 qtdeclarative5-unity-action-plugin (>= 1.1.0),
27 qtdeclarative5-localstorage-plugin,
28- qtdeclarative5-doc-html,
29- qtwebkit5-doc-html,
30- qtsvg5-doc-html,
31- qtscript5-doc-html,
32- qtmultimedia5-doc-html,
33- unity-action-doc,
34+ qtdeclarative5-doc-html,
35+ qtwebkit5-doc-html,
36+ qtsvg5-doc-html,
37+ qtscript5-doc-html,
38+ qtmultimedia5-doc-html,
39+ unity-action-doc,
40 devscripts,
41 libqt5organizer5,
42 qtpim5-dev,
43@@ -135,6 +136,8 @@
44 python-autopilot (>= 1.4),
45 python-fixtures,
46 python-mock,
47+ python3-fixtures,
48+ python3-autopilot (>= 1.4),
49 ubuntu-ui-toolkit-examples (>= ${source:Version}),
50 Description: Test package for Ubuntu UI Toolkit
51 Autopilot tests for the ubuntu-ui-toolkit package
52
53=== modified file 'debian/rules'
54--- debian/rules 2014-03-01 12:51:13 +0000
55+++ debian/rules 2014-03-03 10:20:32 +0000
56@@ -11,6 +11,7 @@
57 override_dh_auto_test:
58 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
59 mkdir -p debian/tmp/home/run
60+ chmod +x tests/xvfb.sh
61 tests/xvfb.sh dh_auto_test || exit $?
62 endif
63
64
65=== modified file 'debian/ubuntu-ui-toolkit-autopilot.install'
66--- debian/ubuntu-ui-toolkit-autopilot.install 2013-10-30 11:35:57 +0000
67+++ debian/ubuntu-ui-toolkit-autopilot.install 2014-03-03 10:20:32 +0000
68@@ -1,1 +1,2 @@
69-usr/lib/python2.7/dist-packages/ubuntuuitoolkit
70+usr/lib/python3
71+usr/lib/python2.7
72
73=== modified file 'modules/Ubuntu/Components/Panel.qml'
74--- modules/Ubuntu/Components/Panel.qml 2013-12-05 16:51:21 +0000
75+++ modules/Ubuntu/Components/Panel.qml 2014-03-03 10:20:32 +0000
76@@ -285,7 +285,6 @@
77 }
78 }
79
80-
81 /*!
82 How much of the panel to show when the user touches the panel's edge.
83 This gives the user a hint that there is a panel hiding at that edge and
84@@ -300,6 +299,16 @@
85 */
86 property real triggerSize: units.gu(2)
87
88+ /*!
89+ \qmlproperty real position
90+ The current position of the edge of the panel. The value is 0 when the panel is
91+ opened, and has its maximum value when the panel is closed. The maximum value is the
92+ width of the Panel for a left or right-aligned panel, and the height of the panel for
93+ top or bottom-aligned panels. When the user drags the Panel from the edge to open it,
94+ the position will change from the maximum size (closed) to 0 (fully expanded).
95+ */
96+ readonly property alias position: bar.position
97+
98 states: [
99 State {
100 name: "hint"
101
102=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml'
103--- modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml 2014-02-26 17:22:38 +0000
104+++ modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml 2014-03-03 10:20:32 +0000
105@@ -163,8 +163,9 @@
106 anchors {
107 bottom: parent.bottom
108 bottomMargin: headerTextBottomMargin
109+ left: button.right
110+ leftMargin: -width
111 }
112- x: button.width - width
113
114 // The indicator image must be visible after the selected tab button, when the
115 // tab bar is not in selection mode, or after the "last" button (starting with
116
117=== modified file 'run_tests.sh'
118--- run_tests.sh 2013-09-26 13:12:49 +0000
119+++ run_tests.sh 2014-03-03 10:20:32 +0000
120@@ -21,9 +21,9 @@
121
122 UBUNTU_UI_TOOLKIT_AUTOPILOT_FROM_SOURCE=1
123 if [ "$1" == "" ]; then
124- autopilot run ubuntuuitoolkit
125+ python3 -m autopilot.run run ubuntuuitoolkit
126 else
127- autopilot run -o ../../$1 -f xml -r -rd ../../ ubuntuuitoolkit
128+ python3 -m autopilot.run run -o ../../$1 -f xml -r -rd ../../ ubuntuuitoolkit
129 fi
130
131 exit 0
132
133=== modified file 'tests/autopilot/ubuntuuitoolkit/base.py'
134--- tests/autopilot/ubuntuuitoolkit/base.py 2013-11-15 05:11:10 +0000
135+++ tests/autopilot/ubuntuuitoolkit/base.py 2014-03-03 10:20:32 +0000
136@@ -31,8 +31,9 @@
137 # configuration on devices and it seems the environment variable
138 # QT_SELECT=qt5 doesn't work for autopilot tests. --Mirv - 2013-10-03
139 arch = subprocess.check_output(
140- ["dpkg-architecture", "-qDEB_HOST_MULTIARCH"]).strip()
141- return '/usr/lib/{}/qt5/bin/qmlscene'.format(arch.decode())
142+ ["dpkg-architecture", "-qDEB_HOST_MULTIARCH"],
143+ universal_newlines=True).strip()
144+ return '/usr/lib/{}/qt5/bin/qmlscene'.format(arch)
145
146
147 class UbuntuUIToolkitAppTestCase(testcase.AutopilotTestCase):
148
149=== modified file 'tests/autopilot/ubuntuuitoolkit/emulators.py'
150--- tests/autopilot/ubuntuuitoolkit/emulators.py 2014-03-01 12:52:42 +0000
151+++ tests/autopilot/ubuntuuitoolkit/emulators.py 2014-03-03 10:20:32 +0000
152@@ -582,7 +582,7 @@
153
154 def _show_more_elements(self, direction):
155 x, y, width, height = self.globalRect
156- start_x = stop_x = x + (width / 2)
157+ start_x = stop_x = x + (width // 2)
158 # Start and stop just a little under the top of the list.
159 top = y + 5
160 bottom = y + height - 5
161@@ -607,7 +607,7 @@
162 def _is_element_clickable(self, objectName):
163 """Return True if the center of the element is visible."""
164 element = self.select_single(objectName=objectName)
165- element_center = element.globalRect.y + element.globalRect.height / 2
166+ element_center = element.globalRect.y + element.globalRect.height // 2
167 return (element_center >= self.globalRect.y and
168 element_center <= self.globalRect.y + self.globalRect.height)
169
170@@ -628,7 +628,7 @@
171 @autopilot_logging.log_action(logger.info)
172 def swipe_to_delete(self, direction='right'):
173 """Swipe the item in a specific direction."""
174- if (self.removable):
175+ if self.removable:
176 self._drag_pointing_device_to_delete(direction)
177 if self.confirmRemoval:
178 self.waitingConfirmationForRemoval.wait_for(True)
179@@ -640,12 +640,12 @@
180
181 def _drag_pointing_device_to_delete(self, direction):
182 x, y, w, h = self.globalRect
183- tx = x + (w / 8)
184- ty = y + (h / 2)
185+ tx = x + (w // 8)
186+ ty = y + (h // 2)
187
188- if (direction == 'right'):
189+ if direction == 'right':
190 self.pointing_device.drag(tx, ty, w, ty)
191- elif (direction == 'left'):
192+ elif direction == 'left':
193 self.pointing_device.drag(w - (w*0.1), ty, x, ty)
194 else:
195 raise ToolkitEmulatorException(
196@@ -663,7 +663,7 @@
197 @autopilot_logging.log_action(logger.info)
198 def confirm_removal(self):
199 """Comfirm item removal if this was already swiped."""
200- if (self.waitingConfirmationForRemoval):
201+ if self.waitingConfirmationForRemoval:
202 deleteButton = self._get_confirm_button()
203 self.pointing_device.click_object(deleteButton)
204 self._wait_until_deleted()
205
206=== modified file 'tests/autopilot/ubuntuuitoolkit/fixture_setup.py'
207--- tests/autopilot/ubuntuuitoolkit/fixture_setup.py 2014-02-12 09:20:43 +0000
208+++ tests/autopilot/ubuntuuitoolkit/fixture_setup.py 2014-03-03 10:20:32 +0000
209@@ -87,7 +87,7 @@
210 qmlscene=base.get_qmlscene_launch_command(),
211 qml_file_path=qml_file_path))
212 desktop_file.write('[Desktop Entry]\n')
213- for key, value in self._desktop_file_dict.iteritems():
214+ for key, value in self._desktop_file_dict.items():
215 desktop_file.write('{key}={value}\n'.format(key=key, value=value))
216 desktop_file.close()
217 return desktop_file.name
218
219=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/test_emulators.py'
220--- tests/autopilot/ubuntuuitoolkit/tests/test_emulators.py 2014-03-01 12:52:15 +0000
221+++ tests/autopilot/ubuntuuitoolkit/tests/test_emulators.py 2014-03-03 10:20:32 +0000
222@@ -14,7 +14,6 @@
223 # You should have received a copy of the GNU Lesser General Public License
224 # along with this program. If not, see <http://www.gnu.org/licenses/>.
225
226-import mock
227 import time
228 import unittest
229
230@@ -22,6 +21,10 @@
231 from autopilot import input, platform
232 from autopilot.introspection import dbus
233 from testtools.matchers import GreaterThan, LessThan
234+try:
235+ from unittest import mock
236+except ImportError:
237+ import mock
238
239 from ubuntuuitoolkit import emulators, tests
240
241
242=== modified file 'tests/autopilot/ubuntuuitoolkit/tests/test_fixture_setup.py'
243--- tests/autopilot/ubuntuuitoolkit/tests/test_fixture_setup.py 2014-02-12 18:41:20 +0000
244+++ tests/autopilot/ubuntuuitoolkit/tests/test_fixture_setup.py 2014-03-03 10:20:32 +0000
245@@ -16,7 +16,12 @@
246
247 import os
248
249-import mock
250+try:
251+ # Python 3.
252+ from unittest import mock
253+except ImportError:
254+ # Python 2 add-on: python-mock.
255+ import mock
256 import testtools
257 from autopilot import testcase as autopilot_testcase
258 from testtools.matchers import Contains, Not, FileExists
259
260=== modified file 'tests/qmlapicheck.py'
261--- tests/qmlapicheck.py 2013-12-11 11:28:29 +0000
262+++ tests/qmlapicheck.py 2014-03-03 10:20:32 +0000
263@@ -1,4 +1,4 @@
264-#!/usr/bin/env python
265+#!/usr/bin/env python3
266 # -*- coding: utf-8 -*-
267 #
268 # Copyright 2013 Canonical Ltd.
269@@ -65,7 +65,9 @@
270 fileinput.nextfile()
271
272 inputfiles.sort()
273-for line in fileinput.input(inputfiles):
274+
275+hook = fileinput.hook_encoded('utf-8')
276+for line in fileinput.input(inputfiles, openhook=hook):
277 # New file
278 if fileinput.isfirstline():
279 in_block = 0
280
281=== modified file 'tests/tests.pro'
282--- tests/tests.pro 2013-10-30 11:35:57 +0000
283+++ tests/tests.pro 2014-03-03 10:20:32 +0000
284@@ -1,7 +1,10 @@
285 TEMPLATE = subdirs
286 SUBDIRS += unit unit_x11
287
288-autopilot_module.path = /usr/lib/python2.7/dist-packages/ubuntuuitoolkit
289+autopilot_module.path = /usr/lib/python3/dist-packages/ubuntuuitoolkit
290 autopilot_module.files = autopilot/ubuntuuitoolkit/*
291
292-INSTALLS += autopilot_module
293+autopilot2_module.path = /usr/lib/python2.7/dist-packages/ubuntuuitoolkit
294+autopilot2_module.files = autopilot/ubuntuuitoolkit/*
295+
296+INSTALLS += autopilot_module autopilot2_module
297
298=== modified file 'tests/unit/add_qmlmakecheck.pri'
299--- tests/unit/add_qmlmakecheck.pri 2014-02-11 12:42:55 +0000
300+++ tests/unit/add_qmlmakecheck.pri 2014-03-03 10:20:32 +0000
301@@ -14,5 +14,6 @@
302 check.commands += qmlplugindump Ubuntu.Components 0.1 modules 2>/dev/null > plugins.qmltypes;
303 check.commands += qmlplugindump Ubuntu.PerformanceMetrics 0.1 modules 2>/dev/null >> plugins.qmltypes;
304 # Palette gets included in Qt 5.2 qmlplugindump even though it's qml
305-check.commands += BUILTINS=QQuick,QQml,U1db::,Palette python tests/qmlapicheck.py modules/Ubuntu/Components/qmldir modules/Ubuntu/Components/Colors/UbuntuColors.qml modules/Ubuntu/Components/Pickers/PickerPanel.qml modules/Ubuntu/Components/*/qmldir modules/Ubuntu/PerformanceMetrics/qmldir plugins.qmltypes > components.api.new;
306+
307+check.commands += BUILTINS=QQuick,QQml,U1db::,Palette python3 tests/qmlapicheck.py modules/Ubuntu/Components/qmldir modules/Ubuntu/Components/Colors/UbuntuColors.qml modules/Ubuntu/Components/Pickers/PickerPanel.qml modules/Ubuntu/Components/*/qmldir modules/Ubuntu/PerformanceMetrics/qmldir plugins.qmltypes > components.api.new;
308 check.commands += diff -Fqml -u components.api components.api.new || exit 1; cd tests/unit
309
310=== modified file 'ubuntu-sdk.pro'
311--- ubuntu-sdk.pro 2013-12-12 13:01:56 +0000
312+++ ubuntu-sdk.pro 2014-03-03 10:20:32 +0000
313@@ -22,10 +22,15 @@
314 QMAKE_EXTRA_TARGETS += test_api
315
316 test_components.target = test-components
317-test_components.commands = cd tests/autopilot; autopilot run ubuntuuitoolkit
318+test_components.commands = cd tests/autopilot; python3 -m autopilot.run run ubuntuuitoolkit
319 test_components.depends = modules/ubuntu-ui-toolkit.pro
320 QMAKE_EXTRA_TARGETS += test_components
321
322+test_components2.target = test-components2
323+test_components2.commands = cd tests/autopilot; python2 -m autopilot.run run ubuntuuitoolkit
324+test_components2.depends = modules/ubuntu-ui-toolkit.pro
325+QMAKE_EXTRA_TARGETS += test_components2
326+
327 qmluitests.target = qmluitests
328 qmluitests.commands = cd tests/unit_x11; make check
329 qmluitests.depends = modules/ubuntu-ui-toolkit.pro

Subscribers

People subscribed via source and target branches

to status/vote changes: