qxmpp icon indicating copy to clipboard operation
qxmpp copied to clipboard

[tests] run tests on Windows

Open jlaine opened this issue 4 years ago • 5 comments

jlaine avatar Mar 24 '20 08:03 jlaine

Codecov Report

:exclamation: No coverage uploaded for pull request base (1.5@67d75d5). Click here to learn what that means. Patch has no changes to coverable lines.

:exclamation: Current head 0571b03 differs from pull request most recent head 72cc589. Consider uploading reports for the commit 72cc589 to get more accurate results

Additional details and impacted files
@@          Coverage Diff           @@
##             1.5     #266   +/-   ##
======================================
  Coverage       ?   76.57%           
======================================
  Files          ?      222           
  Lines          ?    18060           
  Branches       ?        0           
======================================
  Hits           ?    13829           
  Misses         ?     4231           
  Partials       ?        0           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Mar 24 '20 08:03 codecov[bot]

@lnjX this is pretty infuriating, I'm able to build the code and tests under Windows, however running the tests fails with a "DLL not found" error. My guess is that the QXmpp DLL is not being found as it's not on the PATH.

jlaine avatar Mar 24 '20 17:03 jlaine

I'm sorry, but I don't think I can help you with the windows-specific things. You're in the right directory, right? -- I've no idea then.

lnjX avatar Mar 24 '20 17:03 lnjX

I haven't used Windows for the past 20 years so I'm not an ideal candidate for this either :)

I think the problem is that the DLL gets built in one directory (probably under src/ somewhere) whereas the test suite binaries are somewhere in tests/. Linux and OS X have a concept of RPATH, Windows does not: the DLL files need to be on the PATH or in the same directory as the binary.

I read that using set_tests_properties is an option to modify the PATH when executing the test suite, but my CMake skills are rusty and I don't know how to retrieve the directory in which the qxmpp library got built:

https://stackoverflow.com/questions/54560434/shared-library-under-windows-and-cmake-dll-not-found-before-installation

jlaine avatar Mar 24 '20 22:03 jlaine

I think you can get the path using $<TARGET_FILE_DIR:qxmpp>. If that path is added to the PATH variable then the tests should run.

olesalscheider avatar Mar 25 '20 08:03 olesalscheider