QMLStringAppTestCase rejected by Unity8

Bug #1578319 reported by Gerry Boland
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-app-launch (Ubuntu)
Undecided
Unassigned
ubuntu-ui-toolkit (Ubuntu)
High
Christian Dywan

Bug Description

I'm trying to run the ubuntu-ui-toolkit autopilot tests on today's image.

First off, they could cause unity8 to crash, which is bug 1578258 which can be resolved with
https://code.launchpad.net/~gerboland/qtmir/ual-catch-exception/+merge/293805

That causes unity8 to report it rejects some of the test apps the UITK AP test tries to launch:

qtmir.applications: ApplicationController::createApp - UAL failed to create app for appId "ubuntu-ui-toolkit-gallery" : Invalid app ID: ubuntu-ui-toolkit-gallery

UITK AP is launching like this:

/usr/bin/ubuntu-ui-toolkit-launcher -testability -I /usr/lib/modules /usr/lib/arm-linux-gnueabihf/qt5/examples//ubuntu-ui-toolkit/examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml --desktop_file_hint=/usr/lib/arm-linux-gnueabihf/qt5/examples/ubuntu-ui-toolkit/examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.desktop

which is not using upstart-app-launch - which would explain the fail. desktop_file_hint is not a supported means of launching an app (and can go away at any time), so UITK should change to use UAL in its AP tests.

This indeed used to work until recently, but a recent refactoring broke the desktop_file_hint behaviour. Since it's not a supported behaviour, it should not be relied on, so it would be better to fix UITK than restore the old behaviour.

Related branches

Gerry Boland (gerboland)
Changed in ubuntu-app-launch (Ubuntu):
status: New → Invalid
Revision history for this message
Gerry Boland (gerboland) wrote :

Doing a grep in my directory which holds a bunch of applications, I see quite a few are using the desktop_file_hint flag. I think those that point it to /usr/share/applications will succeed, so they'll be ok. But we might break other AP tests I don't have locally

Michael Terry (mterry)
description: updated
Revision history for this message
Michael Terry (mterry) wrote :

So a simple fix would be to ship ubuntu-ui-toolkit-gallery.desktop in /usr/share/applications.

Another fix would be modify ubuntu-ui-toolkit-launcher to allow teaching UAL about a custom app on a temporary basis for such custom launches that aren't apps that we want to ship, but just apps-of-convenience. To do this, it could copy the provided desktop file into ~/.local/share/applications and delete it when done.

OR we could add API to UAL that allows using a custom desktop file.

I'm partial to options 1 and/or 2.

Revision history for this message
Christian Dywan (kalikiana) wrote :

In the general case we write a .desktop file for a particular test to ~/.local/share/applications (hard-coding the exact path relative to $HOME), the gallery test is a special-case which uses the .desktop file that is installed as an example.

It makes no sense to me to add all the test cases to /usr/share/applications permanently, since we're not talking about apps but fabricated QML test cases.

Revision history for this message
Michael Terry (mterry) wrote :

Why is the gallery desktop case different? If you want to make sure your test uses that exact content, you could copy it to ~/.local/share/applications.

Revision history for this message
Christian Dywan (kalikiana) wrote :

Is there still an issue here? We've since landed code so I'm pretty sure the tests can pass.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Incomplete
Revision history for this message
Tim Peeters (tpeeters) wrote :

The tests don't pass on my amd64. I guess we need to load all QML code from external files (and not a string embedded in the python test files). So these tests need to be updated:

test_checkbox.py:class ToggleTestCase(tests.QMLStringAppTestCase):
test_common.py:class UbuntuUIToolkitCustomProxyObjectBaseTestCase(tests.QMLStringAppTestCase):
test_date_picker.py:class DatePickerBaseTestCase(tests.QMLStringAppTestCase):
test_flickable.py:class IsFlickableTestCase(tests.QMLStringAppTestCase):
test_flickable.py:class SwipeFlickableTestCase(tests.QMLStringAppTestCase):
test_flickable.py:class UnityFlickableTestCase(tests.QMLStringAppTestCase):
test_flickable_uitk10.py:class IsFlickableTestCase(tests.QMLStringAppTestCase):
test_flickable_uitk10.py:class SwipeFlickableTestCase(tests.QMLStringAppTestCase):
test_flickable_uitk10.py:class UnityFlickableTestCase(tests.QMLStringAppTestCase):
test_listitems.py:class SwipeToDeleteTestCase(tests.QMLStringAppTestCase):
test_main_view.py:class MainView10TestCase(tests.QMLStringAppTestCase):
test_main_view.py:class MainView12TestCase(tests.QMLStringAppTestCase):
test_main_view.py:class GoBackTestCase(tests.QMLStringAppTestCase):
test_optionselector.py:class OptionSelectorCustomDelegateTestCase(tests.QMLStringAppTestCase):
test_optionselector.py:class OptionSelectorTestCase(tests.QMLStringAppTestCase):
test_popups.py:class ComposerSheetTestCase(tests.QMLStringAppTestCase):
test_qquicklistview.py:class QQuickListViewOutOfViewTestCase(tests.QMLStringAppTestCase):
test_textarea.py:class TextAreaTestCase(tests.QMLStringAppTestCase):
test_toolbar.py:class ToolbarTestCase(tests.QMLStringAppTestCase):

Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Undecided → High
status: Incomplete → Confirmed
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Tim Peeters (tpeeters)
status: Confirmed → In Progress
Tim Peeters (tpeeters)
summary: - Some ubuntu-ui-toolkit AP tests failing to launch - rejected by unity8
- as is using desktop_file_hint
+ UITK AP tests that use QMLStringAppTestCase fail - rejected by unity8 as
+ is using desktop_file_hint
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: Tim Peeters (tpeeters) → Christian Dywan (kalikiana)
Revision history for this message
Christian Dywan (kalikiana) wrote :

I renamed the title. desktop_file_hint is not the problem, the location of the .desktop files is. The hint is in fact still needed.

summary: - UITK AP tests that use QMLStringAppTestCase fail - rejected by unity8 as
- is using desktop_file_hint
+ QMLStringAppTestCase rejected by Unity8
Changed in ubuntu-ui-toolkit (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-ui-toolkit - 1.3.2060+16.10.20160814

---------------
ubuntu-ui-toolkit (1.3.2060+16.10.20160814) yakkety; urgency=medium

  [ Zoltan Balogh ]
  * Fix OptionSelectorTestCase tests.
  * Fix more OptionSelector autopilot tests

  [ Timo Jyrinki ]
  * Disable documentation building for GLES builds. Fixes LP: #1606222.
  * Replace abs with qFabs due to GCC6 breakage. Fixes LP: #1610943.
  * Limit s390x dependencies more due to upstart/s390x problems and removed
    packages in archives. Fixes LP: #1610951

  [ Andrea Bernabei ]
  * ListItemLayout doc: add elide mode change example and add section about
    labels default properties values. Fixes LP: #1603450.
  * ListItemLayout doc: add explicit note about the need to bind ListItem's
    height to layout's height.
  * More Scrollbar optimizations: 20% faster creation time. Fixes LP: #1606451
  * Scrollbar: fix wrong thumb color on tap/mouse release and increase coverage
    of hover states unit tests. Fixes LP: #1608897

  [ Zsombor Egri ]
  * Fix null pointer property initializer used with 1.3 PageWrapper.
    Fixes LP: #1604780.
  * Fix BottomEdge content URL preloading. Fixes LP: #1604509.

  [Albert Astals Cid ]
  * UCUnits::resolveResource: Prefer image path if it exists. This saves
    searching the disk for @gu images, which is a big speedup. According to
    callgrind loading 100 images from a folder that contains 380 images goes
    from around 3 million instructions per UCUnits::resolveResource call down
    to around 10 thousand. This optimization is ok since it is not correct to
    ship both image.png and image@20.png. You either have to ship gu-enabled
    files or not, but mixing them is not allowed. Searched for cases in which
    that may be happening in my phone and found none. Fixes LP: #1604029.

  [ Tim Peeters ]
  * Configure colors of the buttons in the ActionBar and PageHeader through
    their Styles. Fixes LP: #1597774.
  * Fix assigning of constant values to a grouped property in StyleHints.
    Fixes LP: #1602836.
  * Fix list view keyboard navigation for RightToLeft and BottomToTop
    directions. Fixes LP: #1605634
  * Use external QML files instead of embedded QML strings for autopilot tests.
    Fixes LP: #1578319
  * Fix failing autopilot header tests.
  * Fix ActionSelectionPopover Autopilot CPO tests.

  [Christian Dywan ]
  * Include indexes in "offline" docs and filter out link errors.
    Fixes LP: #1603937.
  * Increase focus ring thickness from 1dp to 2dp. Fixes LP: #1602690.
  * Add a snippet about tests to the toplevel README
  * Enter/Return to trigger, Space to expand ComboButton. Fixes LP: #1523817.
  * Initialize engine variable before using it in the _engine case.
  * Use Qt.rgba instead of #0000 checking ListItem default color.
    Fixes LP: #1560004
  * Don't use a different .desktop file in the gallery tests.
    Fixes LP: #1578319
  * Update scaling docs, set QT_SCALE_FACTOR and unset GRID_UNIT_PX.
    Fixes LP: #1610208

  [ Florian Boucault ]
  * Sections: load Icons asynchronously.

 -- Zoltán Balogh <email address hidden> Sun, 14 Aug 2016 09:06:46 +0000

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers