Embedded .desktop files make tests fragile
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unity-scope-click (Ubuntu) |
Fix Released
|
High
|
dobey |
Bug Description
Currently, there are a lot of .desktop files which are simply copied into the tree from a system where the packages that own them were installed at a specific time. In order to test the results of loading these files, we must also have hard-coded vectors in the tests which contain data matching the contents of those files. As we fix bugs or add new features which require the parsing of additional data, or parsing current data in a different way, this can cause some existing tests to break, when they shouldn't be breaking. It's also a bit of a burden to have to maintain an in-memory copy of the contents of the .desktop files.
We should only have a minimal set of .desktop files that are designed to specifically test certain aspects of the code, rather than a bunch of general .desktop files copied in. Ideally, the tests would all be encoded in the test sources directly, and not require any extra files on disk to run the tests.
Related branches
- unity-api-1-bot: Approve (continuous-integration)
- Charles Kerr (community): Approve
-
Diff: 2759 lines (+559/-1446)49 files modifiedCMakeLists.txt (+7/-1)
debian/control (+3/-2)
libclickscope/click/CMakeLists.txt (+4/-1)
libclickscope/click/configuration.h (+4/-4)
libclickscope/click/interface.cpp (+176/-370)
libclickscope/click/interface.h (+14/-29)
libclickscope/click/key_file_locator.cpp (+0/-94)
libclickscope/click/key_file_locator.h (+0/-70)
libclickscope/click/preview.cpp (+5/-2)
libclickscope/tests/CMakeLists.txt (+3/-3)
libclickscope/tests/applications/system/address-book-app.desktop (+0/-15)
libclickscope/tests/applications/system/messaging-app.desktop (+0/-14)
libclickscope/tests/applications/system/translated.desktop (+0/-9)
libclickscope/tests/applications/user/badd-appid.desktop (+0/-10)
libclickscope/tests/applications/user/com.ubuntu.accented_accented_0.5.29.desktop (+0/-13)
libclickscope/tests/applications/user/com.ubuntu.calculator_calculator_0.1.3.206.desktop (+0/-14)
libclickscope/tests/applications/user/com.ubuntu.calendar_calendar_0.4.182.desktop (+0/-14)
libclickscope/tests/applications/user/com.ubuntu.clock_clock_1.0.300.desktop (+0/-14)
libclickscope/tests/applications/user/com.ubuntu.developer.webapps.webapp-amazon_webapp-amazon_1.0.6.desktop (+0/-10)
libclickscope/tests/applications/user/com.ubuntu.developer.webapps.webapp-ebay_webapp-ebay_1.0.8.desktop (+0/-11)
libclickscope/tests/applications/user/com.ubuntu.developer.webapps.webapp-facebook_webapp-facebook_1.0.5.desktop (+0/-12)
libclickscope/tests/applications/user/com.ubuntu.developer.webapps.webapp-gmail_webapp-gmail_1.0.8.desktop (+0/-11)
libclickscope/tests/applications/user/com.ubuntu.developer.webapps.webapp-twitter_webapp-twitter_1.0.5.desktop (+0/-12)
libclickscope/tests/applications/user/com.ubuntu.dropping-letters_dropping-letters_0.1.2.2.43.desktop (+0/-13)
libclickscope/tests/applications/user/com.ubuntu.filemanager_filemanager_0.1.1.97.desktop (+0/-13)
libclickscope/tests/applications/user/com.ubuntu.music_music_1.1.329.desktop (+0/-15)
libclickscope/tests/applications/user/com.ubuntu.notes_notes_1.4.242.desktop (+0/-14)
libclickscope/tests/applications/user/com.ubuntu.shorts_shorts_0.2.162.desktop (+0/-14)
libclickscope/tests/applications/user/com.ubuntu.stock-ticker-mobile_stock-ticker-mobile_0.3.7.66.desktop (+0/-16)
libclickscope/tests/applications/user/com.ubuntu.sudoku_sudoku_1.0.142.desktop (+0/-15)
libclickscope/tests/applications/user/com.ubuntu.terminal_terminal_0.5.29.desktop (+0/-13)
libclickscope/tests/applications/user/com.ubuntu.weather_weather_1.0.168.desktop (+0/-15)
libclickscope/tests/applications/user/non-click-app-nodisplay.desktop (+0/-9)
libclickscope/tests/applications/user/non-click-app-onlyshowin-gnome-unity.desktop (+0/-10)
libclickscope/tests/applications/user/non-click-app-onlyshowin-gnome.desktop (+0/-10)
libclickscope/tests/applications/user/non-click-app-onlyshowin-unity.desktop (+0/-10)
libclickscope/tests/applications/user/non-click-app-without-exception.desktop (+0/-9)
libclickscope/tests/applications/user/pre-translated.desktop (+0/-14)
libclickscope/tests/applications/user/semi-broken.desktop (+0/-1)
libclickscope/tests/mock_ual.h (+155/-0)
libclickscope/tests/test_data.cpp.in (+0/-43)
libclickscope/tests/test_data.h (+0/-3)
libclickscope/tests/test_interface.cpp (+162/-446)
scope/clickapps/apps-query.cpp (+8/-8)
scope/clickapps/apps-scope.cpp (+0/-1)
scope/clickstore/store-query.cpp (+7/-8)
scope/clickstore/store-scope.cpp (+0/-1)
scope/tests/test_apps_query.cpp (+6/-6)
tools/init-departments/init-departments.cpp (+5/-4)
Changed in unity-scope-click (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in unity-scope-click (Ubuntu): | |
assignee: | nobody → Rodney Dawes (dobey) |
status: | Triaged → In Progress |
This bug was fixed in the package unity-scope-click - 0.1.1+16. 10.20160922- 0ubuntu1
--------------- 16.10.20160922- 0ubuntu1) yakkety; urgency=medium
unity-scope-click (0.1.1+
[ Alejandro J. Cura ]
* Do not show the link to the store scope from the apps scope
[ Rodney Dawes ]
* Switch to UAL and libclick for listing installed apps. (LP:
#1317274)
* Add the terminal app desktop file to whitelist.
* Drop the departmentsdb and ubuntu-sdk-libs deps from binary package.
-- Rodney Dawes <email address hidden> Thu, 22 Sep 2016 15:32:56 +0000