Qbs Manual

Qbs 1.11.1

ApplicationExtension ◦ CppApplication

# AutotestRunner

Product that runs all autotests in the project. More...

- List of all members, including inherited members

## Properties

- arguments : stringList
- environment : stringList
- limitToSubProject : bool
- wrapper : stringList

## Detailed Description

An AutotestRunner has a dependency on all products with the type `"autotest"`. Building the AutotestRunner product will then run the respective executables. The builtByDefault property is set to `false` by default, so running the autotests has to be explicitly requested. The default name of the product is `"autotest-runner"`.

To use this feature:

1. Attach the `"autotest"` type to your autotests:

         CppApplication {
             name: "tst_mytest"
             type: ["application", "autotest"]
             // ...
         }

2. Instantiate exactly one AutotestRunner in your project, typically at the top level:

         Project {
             // ...
             AutotestRunner { }
             // ...
         }

3. Trigger the autotest execution by building the product:

         qbs build -p autotest-runner

## Property Documentation

arguments : stringList

The list of arguments to invoke the autotest with.

Default: `[]`

environment : stringList

A list of environment variables that are added to the run environment. They are provided as a list of strings in the form `"varName=value"`.

Default: DYLD_LIBRARY_PATH, DYLD_FRAMEWORK_PATH, and DYLD_ROOT_PATH are set on macOS, or an empty list for other platforms.

limitToSubProject : bool

By default, only those autotests are considered that are in the same sub-project that AutotestRunner was instantiated in. If you want to run all autotests regardless of their location in the project hierarchy, set this property to `false`.

Default: `true`

wrapper : stringList

Wrapper binary and its arguments for wrapping autotest calls. This is useful for tools like Valgrind and alike.

Default: empty

ApplicationExtension ◦ CppApplication