CLion 2022.3 Help

CTest Application

Run | Edit Configurations | Add New Configuration | CTest Application

Use this page to configure run/debug options for the CTest tests.

Common settings

When you edit a run configuration (but not a run configuration template), you can specify the following options:

Name

Specify a name for the run configuration to quickly identify it among others when editing or running.

Allow multiple instances

Allow running multiple instances of this run configuration in parallel.

By default, it is disabled, and when you start this configuration while another instance is still running, CLion suggests stopping the running instance and starting another one. This is helpful when a run configuration consumes a lot of resources and there is no good reason to run multiple instances.

Store as project file

Save the file with the run configuration settings to share it with other team members. The default location is .idea/runConfigurations. However, if you do not want to share the .idea directory, you can save the configuration to any other directory within the project.

By default, it is disabled, and CLion stores run configuration settings in .idea/workspace.xml.

Configuration tab

Item

Description

Test list to run

To run specific tests, specify their names separated by comma. Alternatively, click the icon next to the field and select the desired tests from the list:

List of the available tests in CTest Application

Targets to build

Choose the target from the list. Target types are marked with the following icons:

All targets - All targets

Executable - Executable

Target library - Library

CTest arguments

In this field, type a list of arguments to be passed in the format you would use in the command line. If necessary, click the the Expand button button and type the desired arguments.

Click App general add dark to open the Macros dialog. You can also use path variables in this field.

Working directory

Specify the working directory to be used for running the application. This directory is the starting point for all relative input and output paths. By default, the field contains the directory where the project file resides. To specify another directory, click the Browse button and select the directory.

Click App general add dark to open the Macros dialog. You can also use path variables in this field.

Environment variables

Create environment variables and specify their values. Refer to Adding environment variables for details.

Run with Administrator privileges / Run with root privileges

Set this checkbox to launch the configuration with root privileges. Refer to Debug as root for details.

Last modified: 17 March 2022