-
Notifications
You must be signed in to change notification settings - Fork 116
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
some test fails if test_exe ran from current directory other than build/test #351
Comments
Yes, those are the tests where we read a graph from file (dot or mtx). If you run from some other folder the relative path is not correct anymore. |
I think we can provide an absolute path from CMake to a variable, and pass it to the program. |
Just ran into something like this on my personal project, modern CMake provides the optional named argument WORKING_DIRECTORY to be used together with add_test(). If nobody's gonna try this out i'll give it a try in the next couple weeks |
Ok @badumbatish ! |
i did some digging around. i'm not sure exactly how to do this, but i think the add_test() working_directory option doesn't affect the working directory on the implementation in OutputOperation_impl.hpp and InputOperation_impl.hpp. It'd be better if we refactor, for example, writeToDotFile() to accept a I'm not sure how you feel about this |
could be a good alternative! you can implement it, aso because after the #427 we need to do a new major release and we can change also the interface! |
YES, Sure! |
Describe the bug
if we run test_exe from some other folder than
build/test
then some test failsTo Reproduce
Steps to reproduce the behavior:
DTEST=ON
in cmakebuild/test
, with help ofpwd
in Linuxbuild/test/test_exe
not from the current directorybuild/test
folder.Expected behavior
It should not fail the tests
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: