-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added new DL_PATHS option to catch_discover_tests() #2467
Added new DL_PATHS option to catch_discover_tests() #2467
Conversation
…tion. This enables setting the required PATH/LD_LIBRARY_PATH environment variables both when retrieving the list of text cases and when executing the tests.
Codecov Report
@@ Coverage Diff @@
## devel #2467 +/- ##
=======================================
Coverage 91.49% 91.49%
=======================================
Files 181 181
Lines 7519 7519
=======================================
Hits 6879 6879
Misses 640 640 |
There aren't any tests for |
Thanks, this looks reasonable enough. |
Thanks for adding |
@mchapman87501 I have adapted it to use |
This works. Thank you! I've attached a small project to demonstrate the problem and to show that the fix works. |
Description
This enables setting required
PATH
/LD_LIBRARY_PATH
environment variables both when retrieving the list of test cases and when executing the tests.Some test executables depend on shared libraries and thus can only be launched when the dynamic linker can find their dependencies. With
set_tests_properties()
it is possible to extendPATH
/LD_LIBRARY_PATH
with theENVIRONMENT
property of a test. Unfortunately this does not work with thePROPERTIES
parameter ofcatch_discover_tests()
(especially on Windows because of the;
seperator).At first I tried integrating this by parsing said
ENVIRONMENT
property but ultimately failed due to both my and the cmake language limitations. So I implemented this as a new parameter, which makes it easier to handle the list of paths.I did not find any existing tests for
catch_discover_tests()
, so I did not extend/add one for this. If there is one, please point me in the right direction and I'll add one.