Merge lp:~barry/dialer-app/py3autopilot into lp:dialer-app

Proposed by Barry Warsaw
Status: Merged
Merged at revision: 221
Proposed branch: lp:~barry/dialer-app/py3autopilot
Merge into: lp:dialer-app
Diff against target: 223 lines (+21/-25)
10 files modified
debian/control (+4/-2)
debian/rules (+4/-1)
tests/CMakeLists.txt (+1/-1)
tests/autopilot/dialer_app/emulators.py (+1/-3)
tests/autopilot/dialer_app/fixture_setup.py (+1/-1)
tests/autopilot/dialer_app/helpers.py (+1/-2)
tests/autopilot/dialer_app/tests/__init__.py (+1/-1)
tests/autopilot/dialer_app/tests/test_calls.py (+5/-4)
tests/autopilot/dialer_app/tests/test_dialer.py (+0/-5)
tests/autopilot/dialer_app/tests/test_logs.py (+3/-5)
To merge this branch: bzr merge lp:~barry/dialer-app/py3autopilot
Reviewer Review Type Date Requested Status
Leo Arias (community) Disapprove
PS Jenkins bot continuous-integration Needs Fixing
Dimitri John Ledkov Pending
Review via email: mp+229095@code.launchpad.net

This proposal supersedes a proposal from 2014-07-30.

Commit message

Port tests to Python 3

Description of the change

Port to python3-autopilot

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote : Posted in a previous version of this proposal

8 - python:any,
9 + python3-all,

Should be "python3:any", or "python3-all:any".

Should call dh_python3 helper.

Should install tests in python3 path.

review: Needs Fixing
Revision history for this message
Dimitri John Ledkov (xnox) wrote : Posted in a previous version of this proposal
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote : Posted in a previous version of this proposal

Now the tests are failing with ImportError: No module named 'exceptions'

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote : Posted in a previous version of this proposal

I tested this on my utopic and it works without issues. I don't understand what can be failing now on Jenkins.

Revision history for this message
Barry Warsaw (barry) wrote : Posted in a previous version of this proposal

On May 30, 2014, at 09:34 AM, Leo Arias wrote:

>I tested this on my utopic and it works without issues. I don't understand
>what can be failing now on Jenkins.

IME, that's not an uncommon situation unfortunately. ;)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote : Posted in a previous version of this proposal

It's likely that the previous error while installing ofono was fixed by Francis. But this now needs a merge with trunk. I'm sorry Barry, but can you give it another try?

Revision history for this message
Barry Warsaw (barry) wrote : Posted in a previous version of this proposal

On Jun 20, 2014, at 12:07 AM, Leo Arias wrote:

>It's likely that the previous error while installing ofono was fixed by
>Francis. But this now needs a merge with trunk. I'm sorry Barry, but can you
>give it another try?

Trunk merged and pushed.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote : Posted in a previous version of this proposal

Ok, one single failure. I'll dig into this. Thanks Barry.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Brendan Donegan (brendan-donegan) wrote : Posted in a previous version of this proposal

I can reproduce those failures, plus some other ones.

Revision history for this message
Barry Warsaw (barry) wrote : Posted in a previous version of this proposal

On Jul 22, 2014, at 10:55 AM, Brendan Donegan wrote:

>I can reproduce those failures, plus some other ones.

I just merged trunk for both this and address-book-app, and pushed branch
updates. Let's see what happens.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:144
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~barry/dialer-app/py3autopilot/+merge/228892/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/dialer-app-ci/331/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/dialer-app-utopic-amd64-ci/102
    SUCCESS: http://jenkins.qa.ubuntu.com/job/dialer-app-utopic-armhf-ci/101
        deb: http://jenkins.qa.ubuntu.com/job/dialer-app-utopic-armhf-ci/101/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/dialer-app-utopic-i386-ci/102
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2743
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2184
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2842
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3986
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/3986/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10700
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1811
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2443
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2443/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/dialer-app-ci/331/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote : Posted in a previous version of this proposal

This still needs to be merged with the prerequisite. Or wait for it to land, that should happen soon.

Revision history for this message
Barry Warsaw (barry) wrote : Posted in a previous version of this proposal

On Jul 31, 2014, at 05:19 AM, Leo Arias wrote:

>This still needs to be merged with the prerequisite. Or wait for it to land,
>that should happen soon.

Sorry, I forgot to merge the prereq, although I did set it in the mp. I've
now merged trunk and resubmitted MP without the prereq branch (which has
landed on the trunk).

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:145
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~barry/dialer-app/py3autopilot/+merge/229095/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/dialer-app-ci/338/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/dialer-app-utopic-amd64-ci/109
    SUCCESS: http://jenkins.qa.ubuntu.com/job/dialer-app-utopic-armhf-ci/108
        deb: http://jenkins.qa.ubuntu.com/job/dialer-app-utopic-armhf-ci/108/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/dialer-app-utopic-i386-ci/109
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/2855
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/2270/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/2928
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4098
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/4098/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/10798
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/1876/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2533
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/2533/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/dialer-app-ci/338/rebuild

review: Needs Fixing (continuous-integration)
lp:~barry/dialer-app/py3autopilot updated
146. By Barry Warsaw

trunk merge

147. By Barry Warsaw

Simplify some super() calls.

148. By Barry Warsaw

Try to fix failing test.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~barry/dialer-app/py3autopilot updated
149. By Barry Warsaw

Revert that last change.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~barry/dialer-app/py3autopilot updated
150. By Barry Warsaw

trunk merge

151. By Barry Warsaw

On the autopilot test, sleep before hanging up.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote : Posted in a previous version of this proposal

Sorry about that Failed run up there ^. I clicked the wrong thing on jenkins.

Revision history for this message
Leo Arias (elopio) wrote :

The results from http://jenkins.qa.ubuntu.com/job/dialer-app-ci/354/ are the right ones.
They fail on mako, just as it happens on the dashboard. So it's not related to this branch. I'm flashing my phone to try to reproduce the error.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
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 : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~barry/dialer-app/py3autopilot updated
152. By Barry Warsaw

trunk merge

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: Needs Fixing (continuous-integration)
Revision history for this message
Leo Arias (elopio) wrote :

While Barry is on holidays, I branched this and added the last couple of fixes. That one is ready to land:
https://code.launchpad.net/~canonical-platform-qa/dialer-app/py3autopilot-debug2/+merge/230322

Thanks Barry.

review: Disapprove

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-08-06 15:04:42 +0000
3+++ debian/control 2014-08-08 15:01:46 +0000
4@@ -6,7 +6,8 @@
5 debhelper (>= 9),
6 dh-translations,
7 pkg-config,
8- python:any,
9+ python3-all:any,
10+ dh-python,
11 qt5-default,
12 qtbase5-dev (>= 5.0),
13 qtdeclarative5-dev (>= 5.0),
14@@ -36,13 +37,14 @@
15 Architecture: all
16 Section: debug
17 Depends: ${misc:Depends},
18+ ${python3:Depends},
19 autopilot-qt5,
20 dbus,
21 libqt5test5,
22 libqt5widgets5,
23 dialer-app (>= ${binary:Version}),
24 ofono-scripts,
25- python-autopilot,
26+ python3-autopilot,
27 ubuntu-ui-toolkit-autopilot,
28 ofono-phonesim-autostart,
29 messaging-app,
30
31=== modified file 'debian/rules'
32--- debian/rules 2013-08-22 10:58:07 +0000
33+++ debian/rules 2014-08-08 15:01:46 +0000
34@@ -7,7 +7,7 @@
35 export DPKG_GENSYMBOLS_CHECK_LEVEL=4
36
37 %:
38- dh $@ --parallel --fail-missing --with translations
39+ dh $@ --parallel --fail-missing --with translations,python3
40
41 override_dh_auto_configure:
42 dh_auto_configure -- -DCMAKE_BUILD_TYPE=Debug
43@@ -20,3 +20,6 @@
44 # Unfortunately, the default build directory is not exposed
45 # (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=601774).
46 $(MAKE) -C obj-$(DEB_HOST_GNU_TYPE) dialer-app.pot
47+
48+override_dh_python3:
49+ dh_python3 -pdialer-app-autopilot
50
51=== modified file 'tests/CMakeLists.txt'
52--- tests/CMakeLists.txt 2013-11-18 06:20:29 +0000
53+++ tests/CMakeLists.txt 2014-08-08 15:01:46 +0000
54@@ -1,6 +1,6 @@
55 set(AUTOPILOT_DIR autopilot/dialer_app)
56
57-execute_process(COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
58+execute_process(COMMAND python3 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())"
59 OUTPUT_VARIABLE PYTHON_PACKAGE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
60
61 install(DIRECTORY ${AUTOPILOT_DIR}
62
63=== modified file 'tests/autopilot/dialer_app/emulators.py'
64--- tests/autopilot/dialer_app/emulators.py 2014-08-05 19:44:08 +0000
65+++ tests/autopilot/dialer_app/emulators.py 2014-08-08 15:01:46 +0000
66@@ -16,7 +16,7 @@
67
68 class MainView(toolkit_emulators.MainView):
69 def __init__(self, *args):
70- super(MainView, self).__init__(*args)
71+ super().__init__(*args)
72 self.logger = logging.getLogger(__name__)
73
74 @property
75@@ -58,8 +58,6 @@
76 class PageWithBottomEdge(MainView):
77 """An emulator class that makes it easy to interact with the bottom edge
78 swipe page"""
79- def __init__(self, *args):
80- super(PageWithBottomEdge, self).__init__(*args)
81
82 def reveal_bottom_edge_page(self):
83 """Bring the bottom edge page to the screen"""
84
85=== modified file 'tests/autopilot/dialer_app/fixture_setup.py'
86--- tests/autopilot/dialer_app/fixture_setup.py 2014-01-30 19:29:41 +0000
87+++ tests/autopilot/dialer_app/fixture_setup.py 2014-08-08 15:01:46 +0000
88@@ -24,7 +24,7 @@
89 class TestabilityEnvironment(fixtures.Fixture):
90
91 def setUp(self):
92- super(TestabilityEnvironment, self).setUp()
93+ super().setUp()
94 self._set_testability_environment_variable()
95 self.addCleanup(self._reset_environment_variable)
96
97
98=== modified file 'tests/autopilot/dialer_app/helpers.py'
99--- tests/autopilot/dialer_app/helpers.py 2014-06-13 21:52:17 +0000
100+++ tests/autopilot/dialer_app/helpers.py 2014-08-08 15:01:46 +0000
101@@ -21,7 +21,6 @@
102 import sys
103 import time
104 import dbus
105-import exceptions
106
107
108 def wait_for_incoming_call():
109@@ -96,7 +95,7 @@
110 break
111 time.sleep(1)
112 else:
113- raise exceptions.RuntimeError("oFono simulator didn't get online.")
114+ raise RuntimeError("oFono phone simulator didn't get online.")
115
116 # this is a bit drastic, but sometimes mission-control-5 won't recognize
117 # clients installed after it was started, so, we make sure it gets
118
119=== modified file 'tests/autopilot/dialer_app/tests/__init__.py'
120--- tests/autopilot/dialer_app/tests/__init__.py 2014-07-29 23:43:41 +0000
121+++ tests/autopilot/dialer_app/tests/__init__.py 2014-08-08 15:01:46 +0000
122@@ -55,7 +55,7 @@
123
124 def setUp(self):
125 self.pointing_device = Pointer(self.input_device_class.create())
126- super(DialerAppTestCase, self).setUp()
127+ super().setUp()
128
129 self.set_up_locale()
130
131
132=== modified file 'tests/autopilot/dialer_app/tests/test_calls.py'
133--- tests/autopilot/dialer_app/tests/test_calls.py 2014-08-01 15:46:35 +0000
134+++ tests/autopilot/dialer_app/tests/test_calls.py 2014-08-08 15:01:46 +0000
135@@ -10,8 +10,6 @@
136
137 """Tests for the Dialer App using ofono-phonesim"""
138
139-from __future__ import absolute_import
140-
141 import subprocess
142 import os
143 import time
144@@ -44,10 +42,10 @@
145 'string:modem-objpath=/phonesim'])
146 subprocess.call(['mc-tool', 'reconnect', 'ofono/ofono/account0'])
147
148- super(TestCalls, self).setUp()
149+ super().setUp()
150
151 def tearDown(self):
152- super(TestCalls, self).tearDown()
153+ super().tearDown()
154
155 # ensure that there are no leftover calls in case of failed tests
156 subprocess.call(["/usr/share/ofono/scripts/hangup-all", "/phonesim"])
157@@ -81,6 +79,9 @@
158 self.assertThat(
159 self.main_view.live_call_page.caller, Eventually(Equals(number)))
160
161+ # If we press the hangup button too quickly it won't end the call.
162+ # Reported as bug http://pad.lv/1351817
163+ time.sleep(1)
164 self.main_view.live_call_page.click_hangup_button()
165
166 # log should show call to the phone number
167
168=== modified file 'tests/autopilot/dialer_app/tests/test_dialer.py'
169--- tests/autopilot/dialer_app/tests/test_dialer.py 2014-06-13 21:52:17 +0000
170+++ tests/autopilot/dialer_app/tests/test_dialer.py 2014-08-08 15:01:46 +0000
171@@ -9,8 +9,6 @@
172
173 """Tests for the Dialer App"""
174
175-from __future__ import absolute_import
176-
177 from autopilot.matchers import Eventually
178 from testtools.matchers import Equals
179
180@@ -20,9 +18,6 @@
181 class TestDialer(DialerAppTestCase):
182 """Tests for the Call panel."""
183
184- def setUp(self):
185- super(TestDialer, self).setUp()
186-
187 # FIXME: test disabled until we get a better way to test the keypad keys
188 # def test_keypad_buttons(self):
189 # keypad_entry = self.main_view.dialer_page._get_keypad_entry()
190
191=== modified file 'tests/autopilot/dialer_app/tests/test_logs.py'
192--- tests/autopilot/dialer_app/tests/test_logs.py 2014-07-15 18:31:15 +0000
193+++ tests/autopilot/dialer_app/tests/test_logs.py 2014-08-08 15:01:46 +0000
194@@ -10,8 +10,6 @@
195
196 """Tests for the Dialer App"""
197
198-from __future__ import absolute_import
199-
200 from autopilot.matchers import Eventually
201 from autopilot.platform import model
202 from testtools.matchers import Equals
203@@ -33,7 +31,6 @@
204 db_file = 'history.sqlite'
205 local_db_dir = 'dialer_app/data/'
206 system_db_dir = '/usr/lib/python2.7/dist-packages/dialer_app/data/'
207- devnull = open(os.devnull, 'w')
208
209 def setUp(self):
210 if os.path.exists('../../src/dialer-app'):
211@@ -43,9 +40,10 @@
212
213 subprocess.call(['pkill', 'history-daemon'])
214 os.environ['HISTORY_SQLITE_DBPATH'] = database
215- subprocess.Popen(['history-daemon'], stderr=self.devnull)
216+ with open(os.devnull, 'w') as devnull:
217+ subprocess.Popen(['history-daemon'], stderr=devnull)
218
219- super(TestCallLogs, self).setUp()
220+ super().setUp()
221 testability_environment = fixture_setup.TestabilityEnvironment()
222 self.useFixture(testability_environment)
223 self.main_view.dialer_page.reveal_bottom_edge_page()

Subscribers

People subscribed via source and target branches