testing framework

Andreas Naumann Andreas-Naumann at gmx.net
Mon Jan 31 00:20:39 GMT 2022


On 30.01.22 23:33, Albert Astals Cid wrote:
> El dissabte, 29 de gener de 2022, a les 13:47:48 (CET), Andreas Naumann va escriure:
>> Hey @all,
>>
>> I did not yet find out, how to run the tests properly. At the moment
>> 10/20 tests fail, even on the head of branch release/21.12. With tests,
>> I mean running "ctest " in the build folder.
>>
>> The failing tests are:
>>             2 - kimgiotest (Failed)
>>             6 - documenttest (SEGFAULT)
>>             7 - searchtest (SEGFAULT)
>>            10 - editannotationcontentstest (Failed)
>>            11 - addremoveannotationtest (Failed)
>>            12 - translateannotationtest (Failed)
>>            13 - modifyannotationpropertiestest (Failed)
>>            14 - editformstest (Failed)
>>            16 - mainshelltest (SEGFAULT)
>>            17 - annotationtoolbartest (SEGFAULT)
>>
>> Until now, I followed the instructions at
>> https://okular.kde.org/build-it/ using kde/neon with pre-installed
>> development libraries. My install prefix is my home folder ~/kde_installed.
>>
>> I am puzzled by two advices:
>> 1) The website https://okular.kde.org/build-it/ states "If you install
>> Okular in a different path than your system install directory it is
>> possible that you need to run source build/prefix.sh; okular".
>>       Does that even relate to the tests, or only to the installed
>> binarys? That question came to my mind, because the kimgiotest loads the
>> library "okularGenerator_kimgio.so" from the system, and the newly
>> compiled one.
> Yes, that relates to the tests too.
>
>>       The command "source build/prefix.sh" updates the environment, but
>> it does not change the behavior at all. It does set QT_PLUGIN_PATH to
>> the installed path. But the test seems to ignore it.
> That is strange, just to make sure, you have run make install, you have sourced the prefix.sh file and you're running ctest in the very same terminal session (i.e. where the environment variables have been set), right?
>
> Have you tried if uncommenting the LD_LIBRARY_PATH line from prefix.sh helps? (source the script again after changing it)

Yes, I run "source prefix.sh" and "ctest " in the same shell instance.
The interesting part is, that the export of LD_LIBRARY_PATH is commented
out in the generated "prefix.sh".

With the fixed QT_PLUGIN_PATH, the test "kimgiotest" passes.

I started to check the environment variables and the content of the
referenced folders. The root cause was the combination of
  1) an installed (and incompatible) poppler plugin. The plugin also
remained there after uninstalling okular.
  2) the missing poppler development files.
Thus I never build the poppler plugin, then tests used the plugin from
the system.

Sorry for the noise and thanks for your help.

Greetings,
Andreas

>
>> 2) The documentation at
>> https://community.kde.org/Get_Involved/development#Test_your_changes
>> bases on kdesrc-build. Is that the way to go for every application? It
>> looks a bit cumbersome.
> I've never used kdesrc-build in my almost 20 years of doing KDE stuff, you can use it if you want, don't use it if you don't.
>
> Cheers,
>    Albert
>
>> Regards,
>> Andreas
>>
>>
>
>
>


More information about the Okular-devel mailing list