Skip to content
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

Tests: On Windows place test exes in bin #18677

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chennes
Copy link
Member

@chennes chennes commented Dec 22, 2024

To ensure that the test executables can find the FreeCAD DLL files, all exe files must be in the same directory as those DLLs. I was doing this by hand before, but I believe this is the normal way to make cmake do it automatically. @wwmayer can you verify that this is correct, or let me know a better way? This works on my system, at any rate.

To ensure that the test executables can find the FreeCAD DLL files, all
exe files must be in the same directory as those DLLs.
@wwmayer
Copy link
Contributor

wwmayer commented Dec 23, 2024

This puts the files into the sub-directory Debug or Release (at least here) inside the bin directory. So, it still won't find the needed DLLs.

Btw, how is it supposed to be working with VS to run the tests? I never got it working there.

@chennes
Copy link
Member Author

chennes commented Dec 23, 2024

I'll give it a test with Visual Studio (I use cLion normally, which inverts the folder structure from what you describe, using a completely separate build directory for each build type, and putting the bin directory in that folder). Is there an existing variable I can use to refer to the place that whatever system is running is placing the final executables?

I am not sure how VS wants you to run the tests: in cLion each test and test suite has a "play" button next to it in the editor, plus there's a "run all tests" option. Maybe VS has something similar, I'll poke around at it after the holidays.

@wwmayer
Copy link
Contributor

wwmayer commented Dec 24, 2024

Is there an existing variable I can use to refer to the place that whatever system is running is placing the final executables?

There are the properties RUNTIME_OUTPUT_DIRECTORY_RELEASE, RUNTIME_OUTPUT_DIRECTORY_DEBUG, LIBRARY_OUTPUT_DIRECTORY_RELEASE and LIBRARY_OUTPUT_DIRECTORY_DEBUG.

See here:

MACRO(SET_BIN_DIR ProjectName OutputName)

I am not sure how VS wants you to run the tests: in cLion each test and test suite has a "play" button next to it in the editor, plus there's a "run all tests" option.

It has a menu called Test with some play buttons. When pressing them it does something but then stops without giving any feedback. Anyway, it's not so important because my main platform is Linux.

@chennes chennes marked this pull request as draft December 24, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants