Qbs Manual

Qbs 1.12.1

ApplicationExtension ◦ CppApplication

# AutotestRunner

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

- List of all members, including inherited members

## Properties

- arguments : stringList
- auxiliaryInputs : stringList
- environment : stringList
- limitToSubProject : bool
- workingDir : string
- 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: `[]`

auxiliaryInputs : stringList

This property can contain arbitrary file tags. The AutotestRunner will get dependencies on all products whose type matches at least one of these tags, and invocation of the test executables will happen only after all of the respective artifacts have been built. Set this property if your test executables have run-time dependencies on other products.

Default: Undefined

This QML property was introduced in Qbs 1.12.

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`

workingDir : string

If this property is set, it will be the working directory for all invoked test executables. Otherwise, the working directory will the the parent directory of the respective executable.

Default: Undefined

This QML property was introduced in Qbs 1.12.

wrapper : stringList

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

Default: empty

ApplicationExtension ◦ CppApplication