Skip to content

tests: Upstreaming small fixes

Cosima Neidahl requested to merge OPNA2608/lomiri-ui-toolkit:fix/some-tests into main

From downstream packaging effort in Nixpkgs, some (hopefully) easy-to-upstream patches.

  1. statesaver

This test disregards the existing XDG_RUNTIME_DIR and chooses to manage one on its own, via a temporary directory that it creates. At least for us though, this doesn't set the permissions Qt expects and causes warnings to be printed throughout the test:

tst_StateSaverTest::test_SaveArrays() QStandardPaths: wrong permissions on runtime directory /build/tst_statesaver, 0755 instead of 0700

This causes the test to be considered failed due to unexpected warnings:

25 fatal warnings which MUST be fixed:
  statesaver

We fix this by setting the permissions to 700 after creating the directory.

  1. tst_imageprovider.11.qml

This test refers to an icon via an absolute path: /usr/share/icons/lomiri-mobile/actions/scalable/add.svg. In 976aeb5f, the ubuntu-mobile in this test was changed to lomiri-mobile. I believe this was a mistake, as I was unable to find an icon theme that provides lomiri-mobile? If it does exist though, please do let me know.

Fixes the following seemingly-harmless warning by reverting lomiri-mobile to ubuntu-mobile (disregard the replaced /usr/, we don't implement FHS):

file:///build/source/tests/unit/visual/tst_imageprovider.11.qml:27:9: QML QQuickImage: Cannot open: file:///nix/store/xkgific2fklvlppqv7xfl2dnvjlwsx44-ubuntu-themes-20.10/share/icons/lomiri-mobile/actions/scalable/add.svg

Merge request reports