-
Notifications
You must be signed in to change notification settings - Fork 463
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
Regression on running CTest with v1.18.41 update #3804
Comments
I have no issue with "CTest parallel jobs" with project tests. |
@ebouteillon Does the workaround that @nickassink mentioned work for you? To avoid the very long command string, you should disable the "Allow parallel jobs" setting. This will avoid the very long command. However, to understand your scenario, what exactly are you hoping works? Are you hoping to be able to run all of your tests, in parallel, with the test explorer? While you use the workaround or downgrade, I'm happy to investigate something that might make you scenario still possible. |
@ebouteillon I investigated and am curious if a quick fix I implemented here would solve your issues: Could you download the above zip file, modify the extension to |
Hi Garrett, I forgot to mention my projects use CTest's Here are my tests:
Unfortunately it is not solved |
In short yes, now it will run test cases one by one, so you don't have a massive command to run them all. I will just wait until you fix it for @ebouteillon and test again I think everything will work then. if it does not I will create a separate issue (don't want to highjack this one with a different issue). |
Latest CMake (3.29) has a new command-line option to list the tests to run in a file: If the extension uses this option it should solve the issue for "CMake >= 3.29" users. Not a problem for me, as I can upgrade the CMake version. If you implement it, I can give a feedback. |
@ebouteillon Thanks for testing, could you try this vsix as well? Some context into my attempted fixes is that in order to properly support parallel invocation when being invoked by the test explorer, we have to make sure we support if there is a subset selected in the test explorer. First I tried to be nifty in how I did that, but in this fix I'm being more straightforward. Please let me know if this vsix helps your scenario. |
Hi @gcampbell-msft , new .vsix works for my use case. Command line generated no longer lists all tests cases. |
@ebouteillon Thank you very much for your reply, waiting for this Pull request: #3814 to complete and the problem will be fixed! |
@gcampbell-msft Unfortunately I ran into the same issue using a subset of the test through the TestExplorer and your fix won't tackle that (gtest big parametric test names does not help). |
Hi @triou-harmonicinc , I am using |
@triou-harmonicinc Thanks for the feedback! The previous experience wasn't actually making use of the I agree that our current implementation still definitely has limitations, but that will be a future enhancement. For now, if you want to be able to run a subset, you should disable the The overall issue where invoking all tests from outside of the Test Explorer, will be patched into a patch 1.18 release. |
@ebouteillon The fix will be in the pre-release channel tomorrow! Also, we plan to do a patch official release next week. THanks! |
@gcampbell-msft Sounds good. |
@gcampbell-msft I did test your latest changes and it breaks running a subset of tests with parallel jobs enabled. |
Could you provide some clarity on the repro you tried? I don't see the break that you speak of when I tested on my machine: CTest_Subset.mp4 |
If you're referring to the button here, I don't think this is the intent of the Test Explorer, when debugging, it doesn't include information about the subset: CTest_Subset_Top_Button.mp4In which case, this wouldn't be a regression. Also, I tested in 1.17.17 and this behavior was there as well. |
Yes, please feel free to create a new issue for any request you have for improved behavior. Thanks! |
@triou-harmonicinc This is what I see: CTestSelect.mp4Is there something else I'm missing? |
@gcampbell-msft I just tested it with te pre release and this also fixed my issue. thank you. |
@gcampbell-msft Sorry for the delayed answer, I am trying to debug the issue. It seems to depend on the filter I am using which I find very peculiar. |
The issue comes from the TestRunRequest.include field which is ont correctly filled with a specific filter. So the bug might come from the test explorer extension API itself. It might also be linked to my configuration. Anyway, thanks for your support I will try to look into it more deeply and report to the right place if I can figure out what's wrong. |
Brief Issue Summary
When I click on the status bar button "CMake: run CTest tests":
Context : I use WSL2 to run a CentOS7 linux environment. My project has 2400+ unit tests written with GTest. CMake detects them all with the built-in
gtest_discover_tests(target)
command. And thus all tests are visible in the "Testing" pane of VSCode.When I click the status bar "CMake: run Ctest tests", I observe a change in the command line generated and executed by the VSCode extension:
v1.17.17 executes this (short) command:
v1.18.41 executes a 161k+ characters long command (truncated to keep thing readable):
1/ In "Testing" pane, I see the timer running as if VSCode is waiting the end of tests execution... that failed immediately.
2/ The new extensions version generates a command which lists all the 2400+ tests. The command is 161k+ character long. I tried to run it in a shell but it fails immediately with
bash: opt/cmake/bin/ctest: Argument list too long
. Searching the web I found that you can increase size usingulimit
but can only be up to 65K. So still not enough to fix the issue.Can you fix this generated command please?
CMake Tools Diagnostics
Debug Log
Additional Information
No response
The text was updated successfully, but these errors were encountered: