Menu

#279 Tests fail unless the program is installed

2.0
open
nobody
None
2023-01-09
2023-01-04
No

Currently, tests fail (in shared mode) because dynamic linker tries to load libzint.so.2.12 and libQZint.so.2.12 which are not available unless the program had been installed. Even worse, this way, one would probably be wrongly testing the previous version, not the current one. Anyway, the tests should not require installation. Consider modifying zint_add_test macro in the following way:

set_tests_properties(${test_name} PROPERTIES ENVIRONMENT
    "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/backend")

This is for libzint.so.2.12, libQZint.so.2.12 gets installed under backend_qt subdirectory, but I'm sure you'd figure the right magic out. :-)

Discussion

  • Git Lost

    Git Lost - 2023-01-05

    Hi Alexey, thanks for pointing this out. Yes, will implement the solution you suggest (perhaps using PATH for Windows/MSVC), will report back...

     
  • Git Lost

    Git Lost - 2023-01-09

    Hi, implemented your suggestion with commit [5669ad], thanks.

     

    Related

    Commit: [5669ad]


Log in to post a comment.