-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Fix test targets arguments for MSVC #3636
Fix test targets arguments for MSVC #3636
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add a brief description of what problem this PR is solving?
Arguments can't be quoted, when I "build" the test project, as it fails to properly parse the arguments and show error about missing -C (debug/release) configuration argument. Additionally, I can't run unit tests which has arguments from VS's test explorer, but this is not something we can do about here. I'll eventually add a bug report to MS for both things. |
Hmm, I can see that the CIs are also calling ctest without quoted arguments - so maybe it should just be removed for all cases? |
Does ctest default to release on linux systems, ie. the configuration is explicit set here |
Are you referring to the fact that
We used to do
I wouldn't be surprised. Unit tests are mostly for contributors and most of our contributors don't use VS.
Yes.
Not sure I understand the question. |
Yes, in the cmake target the arguments are in qoutes, which doesn't work when "build" in VS - it just call ctest on build.
yes, that would properly give the same result, ie. generating the XML file. Additionally it would also be reflected locally, if you just run make tests. This won't happen now as it only has the -V argument
If I run ctest.exe directly in my build tree it shows:
The -C argument is only present on the two windows CI, but not in the linux variants. So I'm puzzled that it is required on windows, but seems optional on linux. |
On Linux a build tree can only have a single configuration. So the directory from which |
Ahh okay. I'll try update the CI to make use of the --build . --tests again and see if it can work this way. |
Could you please squash everything into two commits: one for the |
b0f260b
to
b2828dc
Compare
Adds arguments to test projects in VS, so clouds etc. is properly found.
However I later found out that running the unit test from the unit test explorer in VS, still doesn't pick them up.
Also, if I run the Tests project, which seems to init ctest, some other arguments are passed and it complains about -C 'release/debug' argument is not present.