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

Build fails with LINK : fatal error LNK1104 due test executable is blocked by TestMate #235

Closed
HenkjanSmits opened this issue Nov 17, 2020 · 14 comments

Comments

@HenkjanSmits
Copy link

I use this extension in VS Code together with the CMmake Tools extension and Google Tests. When compiling projects using CMake the linker cannot access the output .exe files. This is because their handles are held by this extension, i think because of test discovery or something. As a consequence i either have to disable this extension during significant compilation work or re-start the compilation many times. There doesnt seem to be a config parameter that prevents this behaviour.

Steps:
1. Compile significant project using CMake tools in VS Code with this extension and a pattern set that catches test projects e.g.
"pattern": "{build_vscode-Debug}/**/{test,Test,TEST}*",
2. Observe linker trying to overwrite test .exe files but being prevented from doing so, stopping compilation.
3. Disable the C++ TestMate extension, and run compilation again. Then there is no issue.

@matepek
Copy link
Owner

matepek commented Nov 17, 2020

Hey,
This extension is only keeps open a handle if discovers, reads test list or execute tests.
I'm guessing in your case the second one is the situation. for that you can do a couple of things:

  • you can split the executable to smaller ones. I think that would help a lot and there are other benefits of it too.
  • you can enabling discovery.testListCaching. That might helps too.
  • you can play with discovery.runtimeLimit but I don't think that would help actually.

Anyhow from the insufficient provided informations thats all I can do. Feel free to elaborate the issue with extensive informations for further assistance. ^^

@matepek
Copy link
Owner

matepek commented Nov 19, 2020

Try this modified version: vscode-catch2-test-adapter-3.6.7-dev.vsix.zip
You can install manually.

@HenkjanSmits
Copy link
Author

HenkjanSmits commented Nov 19, 2020 via email

@matepek
Copy link
Owner

matepek commented Nov 19, 2020

Well, for beginning it would be nice if you would fill this
I don't even now your OS type :)

@HenkjanSmits
Copy link
Author

HenkjanSmits commented Nov 20, 2020 via email

@HenkjanSmits
Copy link
Author

HenkjanSmits commented Nov 20, 2020 via email

@matepek
Copy link
Owner

matepek commented Nov 21, 2020

Problem remains.

Well thats not a good sign.

I have another idea and since you are using CMake it's fairly easy to work with it.
Do you have control over your source?
We have to do some modification on the build system. Nothing serious thought.

@matepek
Copy link
Owner

matepek commented Nov 21, 2020

And I would need your full log. (I'm saying full because in a lot of cases people just sending me what they think its relevant. Sometimes it's ok but mostly missing some important parts. Well you are a programmer, you can imagine.)
It contains diagnostic informations which will help me a lot. Check this for how to

@matepek matepek changed the title Catch2 textexplorer holds onto executable handles Build fails with LINK : fatal error LNK1104 due test executable is blocked by TestMate Nov 21, 2020
@matepek
Copy link
Owner

matepek commented Nov 21, 2020

Also, try this experimental build: vscode-catch2-test-adapter-3.6.8-dev.vsix.zip

@HenkjanSmits
Copy link
Author

HenkjanSmits commented Nov 24, 2020 via email

@HenkjanSmits
Copy link
Author

HenkjanSmits commented Dec 4, 2020 via email

@HenkjanSmits
Copy link
Author

HenkjanSmits commented Dec 4, 2020 via email

@matepek
Copy link
Owner

matepek commented Dec 6, 2020

The 3.6.8_dev version is special. Tell me more about the "test access in the testpanel was very slow". I have to understand the effects of that feature before I release it.

@matepek
Copy link
Owner

matepek commented Dec 15, 2020

Until further investigation/information I'm closing this issue.

@matepek matepek closed this as completed Dec 15, 2020
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

No branches or pull requests

2 participants