Bug 497361 - Different install locations for kmymoney plugins
Summary: Different install locations for kmymoney plugins
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: buildsystem (show other bugs)
Version: git (master)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-12 12:16 UTC by Ralf Habacker
Modified: 2024-12-16 11:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2024-12-12 12:16:08 UTC
KMyMoney plugins are normally installed into a subdirectory named `<qt-5-plugin-root-dir>/kmymoney_plugins` except a few one, which needs special attention to get associated tests working. 


SUMMARY


STEPS TO REPRODUCE
1. build kmymoney from master branch on Linux
2. run the created unit tests  with  QT_PLUGIN_PATH=<kmymoney-build-dir>/lib ctest --test-dir <kmymoney-build-dir> -t test
3. inspect the test results

OBSERVED RESULT
There are often test failures like: 

The following tests FAILED:
	 63 - mymoneyxmlreader-test (Failed)

EXPECTED RESULT
This test should not fail 

SOFTWARE/OS VERSIONS
Operating System: openSUSE Leap 15.5
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
The main reason for this problem is that the requested plugin is created in a different location than expected, which requires additional manual actions.
Comment 1 Bug Janitor Service 2024-12-12 12:43:13 UTC
A possibly relevant merge request was started @ https://invent.kde.org/office/kmymoney/-/merge_requests/245
Comment 2 Ralf Habacker 2024-12-12 21:31:52 UTC
Git commit 4179897a227862b796f77395e2547910787fdf7f by Ralf Habacker.
Committed on 12/12/2024 at 20:56.
Pushed by habacker into branch 'master'.

Remove outdated symbolic link setup for running kmymoney from build dir

As the plugins are created in the 'kmymoney_plugins' subdirectory of the
build directory, the symbolic links that were previously required to
find these plugins are no longer necessary.

M  +0    -17   kmymoney/CMakeLists.txt

https://invent.kde.org/office/kmymoney/-/commit/4179897a227862b796f77395e2547910787fdf7f
Comment 3 Ralf Habacker 2024-12-12 21:32:00 UTC
Git commit 7e43c15a85015c6e97053172f850d0ac49308398 by Ralf Habacker.
Committed on 12/12/2024 at 20:55.
Pushed by habacker into branch 'master'.

cmake: install onlinetasks plugin in kmymoney plugin directory

The mentioned plugin was created in a different directory which
resulted in manual actions being required to get unit tests that
use plugins to run. The problem has been fixed with this commit.
FIXED-IN:5.2

M  +0    -1    kmymoney/CMakeLists.txt
M  +3    -3    kmymoney/mymoney/onlinejobadministration.cpp
M  +13   -18   kmymoney/plugins/onlinetasks/sepa/CMakeLists.txt

https://invent.kde.org/office/kmymoney/-/commit/7e43c15a85015c6e97053172f850d0ac49308398
Comment 4 Ralf Habacker 2024-12-16 11:21:27 UTC
(In reply to Ralf Habacker from comment #0)
> STEPS TO REPRODUCE
> 1. build kmymoney from master branch on Linux
> 2. run the created unit tests  with  QT_PLUGIN_PATH=<kmymoney-build-dir>/lib
> ctest --test-dir <kmymoney-build-dir> -t test
> 3. inspect the test results
> 
> OBSERVED RESULT
> There are often test failures like: 
> 
> The following tests FAILED:
> 	 63 - mymoneyxmlreader-test (Failed)

Another reason is that plugins created with the function kcoreaddons_add_plugin() in the kmymoney source code are expected in the subdirectory `bin` below the build root directory and the environment variable QT_PLUGIN_PATH is ignored when loading.