![]() ![]() You can use the tools of dynamic analysis for your tests to eliminate issues at runtime. In case of a multi-test configuration, you will be prompted to select a single test from the list: If you start a debug session for a CTest test, CLion will run the test itself under debug instead of launching the ctest child process. ![]() To save it, select it in the Edit Configurations dialog and press : When you run a test using gutter icons, CLion creates a temporary CTest Application configuration, which is greyed out in the configurations list. Click the left-hand gutter icon next to it and select from the list of options: Open the CMakeLists.txt file and find the add_test command that corresponds to the desired test. Select the configuration in the switcher and click one of the toolbar icons, or use the corresponding shortcuts. To run or debug tests, use one of the following options: Other fields of the configuration settings are described on the reference page. For example, specify -parallel to run the tests in parallel if your tests support that. In the CTest arguments field, you can provide additional flags. To filter the list of tests using CTest options with regular expressions, use the CTest arguments field. In this case, check the version of CMake in Settings | Build, Execution, Deployment | Toolchain and make sure CTest tests are enabled in your CMakeLists.txt files. You can use smart search within the List of Available Tests for easier navigation:ĬLion will notify you if the version of ctest you are using is less than 3.14, or if there were no tests detected in the project. In the Test list to run field, select the tests to be included. Provide the configuration name and specify the settings. Go to Run | Edit Configurations, click and select CTest Application from the list of templates: You can edit the automatically created configuration and add more configurations of the same type in the Edit Configurations dialog. This configuration is called All Tests and is based on the CTest Application template. When you open a project that uses CTest, CLion detects the tests and automatically creates a run/debug configuration for them. Selecting an arbitrary ctest executable is not supported. The minimal supported version of CTest is 3.14.ĬLion uses the ctest executable located in the same folder as the toolchain's cmake executable. CTest is a test automation tool distributed as part of CMake.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |