type: Group
instructions:
  - type: AppendToEnvironmentVariable
    variableName: CTEST_ARGS
    variableValue: " -V"

  - type: AppendToEnvironmentVariable
    variableName: CTEST_ARGS
    variableValue: " --stop-on-failure"
    enable_if:
      condition: property
      property: features
      contains_value: AbortTestingOnFirstFailure

  - type: AppendToEnvironmentVariable
    variableName: CTEST_ARGS
    variableValue: " --no-label-summary"

  - type: Group
    instructions:
      - type: ExecuteCommand
        command: "{{.Env.TESTS_ENV_PREFIX}} ctest {{.Env.CTEST_ARGS}}"
        executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
        ignoreExitCode: false
        maxTimeInSeconds: 14400
        maxTimeBetweenOutput: 14400
        userMessageOnFailure: >
          Failed to run tests.

