[CMake] CTest integration in Visual Studio TestExplorer

Nagy-Egri Máté Ferenc csiga.biga at aol.com
Thu Feb 4 09:33:25 EST 2016


Hi Michael,

first of all, let me congratulate you on the integration. Great stuff and much apreciated.

I gave your add-in a spin, however it fails to find my unit tests. I set the output directory globally in the top-level CMakeLists.txt file as


set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${Build_Root}/bin/${Configuration_Name})

inside my unit-tests’ file I have entries such as

# Adding library target for build
add_executable (STL-Test1-RK4 ${STL_Test1_RK4_BUILD})

…

# Add CTest entry
add_test( ${PROJECT_NAME} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/STL-Test1-RK4 )


I have configured my build to use VS2015 Win64 platform. Because the default is to look for x86 targets, I changed the default test platform to be x64 within VS, but it still won’t find my tests. Could you give some directions what might I be doing wrong?

Cheers,
Máté


Feladó: Stuermer, Michael SP/HZA-ZSEP
Elküldve: 2016. január 22., péntek 12:37
Címzett: cmake at cmake.org
Tárgy: [CMake] CTest integration in Visual Studio TestExplorer

Hello everyone,

picking up the line from Tobias from around a year ago I changed a few things in the ctest unittest adapter. It now works for both Visual Studio 2013 and 2015. 2012 is supported in general but I didn't try it (means: I can install it). Merging and pull request for original version will follow (as soon as there is time), but I would be really happy if some developers from the community could comment on the current state and give some feedback.

I tested it so far with the CMake build and tests and discovering and executing the whole lot of 400+ tests runs well so far. Let me know what could/should be improved.

You can download the latest version of the extension here:

https://github.com/micst/CTestTestAdapter/blob/micst/CTestTestAdapter.vsix

Check the sources on github here:

https://github.com/micst/CTestTestAdapter

best regards,
Michael


-----Original Message-----
From: Tobias Becker [mailto:becker.tobi at gmail.com] 
Sent: Saturday, November 22, 2014 11:35 PM
Subject: [CMake] CTest integration in Visual Studio TestExplorer

So I tried my luck with creating an extension for Visual Studio that allows you to use the Test Explorer to discover and run your CTests.  You can download it in the visual studio gallery. Read about it on http://thetoeb.de/2014/11/22/ctest-integration-visualstudio/ .

I'd be happy if anyone wanted to give me feedback or contribute on https://github.com/toeb/CTestTestAdapter ;)

Sorry for the shameless plug (but hey - its free)


Kind Regards,

Tobias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20141122/0a27b2b7/attachment.html>

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160204/f5b36c0d/attachment.html>


More information about the CMake mailing list