[cmake-developers] cmake-file-api and CTest

Nagy-Egri Máté Ferenc csiga.biga at aol.com
Thu Aug 22 07:16:54 EDT 2019


Hi!

Someone managed to beat me to creating a CTest adapter for the Test Explorer UI extension to Visual Studio Code, so instead of writing on from scratch, I’ll start contributing to it. There is an „autorun test” property which can be triggered when the adapter sees fit. I wanted to create file watchers for the executable AND any files the test depends on, based on the REQUIRED_FILES property of the test. However, when the REQUIRED_FILES property is set on a test and I ask for –show-only=json-v1 ctest.exe fails with exit code -1073740791 and outputs nothing. Was this intended?

Cheers,
Máté

Feladó: Nagy-Egri Máté Ferenc
Elküldve: 2019. július 9., kedd 9:41
Címzett: Kyle Edwards; CMake fejlesztők
Tárgy: RE: [cmake-developers] cmake-file-api and CTest

Hi Kyle,

I’ve never contributed to CMake before. I once wanted to enchance the makefile generators with batch-mode support and built CMake myself and walked through the code in debug mode to see what it does. I identified the entry point where I should’ve placed my code, but essential it would’ve require a major rewrite of the makefile generators to enable deferred makefile generation. Daunted by the amount of work, I figured it was not worth the effort. (It was primarily motivated by NMake.)

I’ll try giving the file API a spin and see if I understand the code enough to be able to add new queries and extract tests from the internal representation. I was hoping to not have to touch CMake itself for this summer project, but it seems that’s the first step.

Cheers,
Máté

Feladó: Kyle Edwards
Elküldve: 2019. július 8., hétfő 15:56
Címzett: Nagy-Egri Máté Ferenc; CMake fejlesztők
Tárgy: Re: [cmake-developers] cmake-file-api and CTest

On Sun, 2019-07-07 at 09:04 +0000, Nagy-Egri Máté Ferenc via cmake-
developers wrote:
> Hi!
> 
> I am trying to cook a CTest back-end to the Test Explorer UI
> extension for VS Code as a summer project and I thought of using the
> new cmake-file-api for it. The docs however are understandably scarce
> and I could not muster how to obtain tests and not targets. Is it
> possible with this initial API design? If not, is my best bet to
> invoke CTest and parse the console output?

FileAPI does not currently list CTest tests, though I agree that this
would be a good thing to have, perhaps for 3.16. Is this something
you'd be willing to help with?

Kyle


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake-developers/attachments/20190822/3363bc14/attachment.html>


More information about the cmake-developers mailing list