If you have a (example) CMake project which shows your error just let me know. I can have a quick look at it.
If you rebuild the ctest adapter with logging enabled, you should not have to recompile everything. Uninstalling the current and installing the recompiled vs extension should be enough. Once reloading your solution you should see some logging messages in the “Test” and in the “CTestAdapter” output window. From: CMake [mailto:[email protected]] On Behalf Of Máté Ferenc Nagy-Egri via CMake Sent: Thursday, February 04, 2016 5:51 PM To: [email protected] Subject: Re: [CMake] CTest integration in Visual Studio TestExplorer Indeed, both RUN_TESTS and the CTest files exist, I have even found a file created by the add-in which seems to hold correct target names. Recompiling will take some time, but will try to help with it. ________________________________ Feladó: Stuermer, Michael SP/HZA-ZSEP<mailto:[email protected]> Feladva: 2016.02.04. 16:27 Címzett: Nagy-Egri Máté Ferenc<mailto:[email protected]>; [email protected]<mailto:[email protected]> Tárgy: RE: CTest integration in Visual Studio TestExplorer Hi Máté, thanks for trying the extension! Some questions before going more into details: - do you have a CTestTestfile.cmake in your build root i.e. where the.sln file is you have opened with Visual Studio? - do you have a RUN_TESTS target/project in your visual studio solution? It could be in the “CMakePredefinedTargets” folder… The basic concept of test discovery for the plugin is, to look for a CTestTestfile.cmake file in the same folder where the .sln file is. From there all CTestTestfile.cmake files are searched recursively and all tests which are defined by add_test() within the files are added to the test list. There are some debug logging lines in the plugin, but I deactivated them for now. Unfortunately there is no option-page where you can switch the logging on/off (should move that to the top of the feature list). You could get the sources from github, enable logging, build your custom version and see what message you get. The changes would be in “CTestExecutor.cs” (line 27) and “CTestDiscoverer.cs” (line 29). Change the line public bool EnableLogging { get; set; } = false; to public bool EnableLogging { get; set; } = true; further comments inline. From: CMake [mailto:[email protected]] On Behalf Of Nagy-Egri Máté Ferenc via CMake Sent: Thursday, February 04, 2016 3:33 PM To: [email protected]<mailto:[email protected]> Subject: Re: [CMake] CTest integration in Visual Studio TestExplorer 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}) [>] this should be perfectly OK, ctest should take care for itself where to find the binaries to execute when testing. 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 ) [>] what do you mean by „unit-test file”? Is it just another CMakeLists.txt or cmake script in your cmake script tree? or is this some script you run using ctest? I am not familiar with the ctest scripting options and I am pretty sure this is not supported by the extension right now. It is mainly thought to provide the tests which are executed by the RUN_TESTS target within the test explorer and allow more comfortable separate test running from within VS. 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? [>] AFAIK you don’t have to switch any [Az eredeti üzenetnek csak egy része van beillesztve.]
-- 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
