broken autopkgtest: X11: ImportError('No module named Xlib',)

Bug #1320175 reported by Martin Pitt on 2014-05-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-system-settings-online-accounts (Ubuntu)
Undecided
Martin Pitt

Bug Description

This package's autopkgtest is failing (see https://jenkins.qa.ubuntu.com/job/utopic-adt-ubuntu-system-settings-online-accounts/21/ARCH=i386,label=adt/console):

======================================================================
ERROR: online_accounts_ui.tests.test_online_accounts_ui.OnlineAccountsUiTests.test_create_account_with_form(with mouse)
----------------------------------------------------------------------
Empty attachments:
  /var/log/syslog

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/online_accounts_ui/tests/test_online_accounts_ui.py", line 50, in setUp
    self.pointer = Pointer(self.input_device_class.create())
  File "/usr/lib/python2.7/dist-packages/autopilot/input/__init__.py", line 298, in create
    return _pick_backend(backends, preferred_backend)
  File "/usr/lib/python2.7/dist-packages/autopilot/utilities.py", line 64, in _pick_backend
    "Unable to instantiate any backends\n%s" % '\n'.join(failure_reasons))
RuntimeError: Unable to instantiate any backends
X11: ImportError('No module named Xlib',)

(and some more similar ones).

At first this looks like a missing autopilot-desktop-legacy test dependency, this has all the additional packages to run AP tests.

At the same time we should also move this to Python 3 now. I'll have a first look at this.

Related branches

Martin Pitt (pitti) wrote :

It's also expecting an existing X server; it should run through xvfb. autopilot-sandbox-run makes this very easy.

Martin Pitt (pitti) wrote :

After fixing both of the above issues (in attached branch), I'm now getting a "real" failure in one of the tests:

======================================================================
FAIL: online_accounts_ui.tests.test_online_accounts_ui.OnlineAccountsUiTests.test_title(with mouse)
----------------------------------------------------------------------
Empty attachments:
  process-stdout

/var/log/syslog: {{{
May 16 10:49:26 autopkgtest dbus[339]: [system] Activating service name='org.freedesktop.NetworkManager' (using servicehelper)
May 16 10:49:26 autopkgtest dbus[339]: [system] Activated service 'org.freedesktop.NetworkManager' failed: Launch helper exited with unknown return code 1
}}}

process-return-code: {{{-15}}}
process-stderr: {{{
Testability driver loaded. Wire protocol version is "1.4".
virtual void OnlineAccounts::Plugin::registerTypes(const char*) Ubuntu.OnlineAccounts
unity::action::ActionManager::ActionManager(QObject*):
 Could not determine application identifier. HUD will not work properly.
 Provide your application identifier in $APP_ID environment variable.
qrc:/qml/AccountsPage.qml:33:9: QML ListView: Binding loop detected for property "height"
account-service-model.cpp 291 update
account-service-model.cpp 291 update
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/ListItems/IconVisual.qml:41:5: QML ImageWithFallback: Failed to get image from provider: image://theme/fake-oauth
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/ListItems/IconVisual.qml:41:5: QML ImageWithFallback: Failed to get image from provider: image://theme/fake-oauth
file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/ListItems/IconVisual.qml:41:5: QML ImageWithFallback: Failed to get image from provider: image://theme/test-login
}}}

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/online_accounts_ui/tests/test_online_accounts_ui.py", line 80, in test_title
    self.assertThat(header.title, Eventually(Equals('Online Accounts')))
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 406, in assertThat
    raise mismatch_error
MismatchError: After 10.0 seconds test on Header.title failed: u'Online Accounts' != dbus.String(u'Accounts', variant_level=1)

Ran 3 tests in 31.562s
FAILED (failures=1)
adt-run: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ tests done.

Indeed ./src/qml/MainPage.qml has title: i18n.tr("Accounts") . This test is just shadowed on the phone due to

        if model() != 'Desktop':
            return

Martin Pitt (pitti) on 2014-05-16
Changed in ubuntu-system-settings-online-accounts (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: New → In Progress
Martin Pitt (pitti) wrote :

I split off the py3 thing to bug 1320211 as this isn't ready yet.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-system-settings-online-accounts - 0.3+14.10.20140516.1-0ubuntu1

---------------
ubuntu-system-settings-online-accounts (0.3+14.10.20140516.1-0ubuntu1) utopic; urgency=low

  [ Martin Pitt ]
  * Fix wrong title check in autopilot test. Run autopilot under Xvfb
    and dbus-launch in the autopkgtest, and add missing autopilot-
    desktop test dependency. (LP: #1320175)
 -- Ubuntu daily release <email address hidden> Fri, 16 May 2014 12:29:42 +0000

Changed in ubuntu-system-settings-online-accounts (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers