summaryrefslogtreecommitdiffstats
path: root/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml
blob: ba9b1f3a796f36efa2e1dee1b98b9b75d719b61a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
type: Group
instructions:
  - type: ScheduleUploadTestResults
  - type: PrependToEnvironmentVariable
    variableName: PATH
    variableValue: "{{.Env.PYTHON3_PATH}}:"
    disable_if:
      condition: property
      property: host.os
      equals_value: Windows
  - type: EnvironmentVariable
    variableName: TESTRUNNER
    variableValue: "{{.Env.LIBEXEC_INSTALL_DIR}}qt-testrunner.py --"
  - type: AppendToEnvironmentVariable
    variableName: TESTRUNNER
    variableValue: " {{.SourceDir}}/coin_qnx_qemu_runner.sh"
    enable_if:
      condition: property
      property: target.osVersion
      in_values: [QNX_710]
  - type: Group
    enable_if:
      condition: property
      property: features
      contains_value: UseAddressSanitizer
    instructions:
    - type: EnvironmentVariable
      variableName: ASAN_OPTIONS
      variableValue: "malloc_context_size=100"
    - type: EnvironmentVariable
      # Override qt-testrunner as we don't want to gather test statistics
      # because many tests FAIL when built with ASAN.
      variableName: TESTRUNNER
      variableValue: "{{.Env.LIBEXEC_INSTALL_DIR}}sanitizer-testrunner.py"
  - type: EnvironmentVariable
    variableName: COIN_CTEST_RESULTSDIR
    variableValue: "{{.AgentWorkingDir}}\\testresults"
    enable_if:
      condition: property
      property: host.os
      equals_value: Windows
  - type: EnvironmentVariable
    variableName: COIN_CTEST_RESULTSDIR
    variableValue: "{{.AgentWorkingDir}}/testresults"
    disable_if:
      condition: property
      property: host.os
      equals_value: Windows
  - type: EnvironmentVariable
    variableName: CTEST_ARGS
    variableValue: "-V"
  - type: AppendToEnvironmentVariable
    variableName: CTEST_ARGS
    variableValue: " --stop-on-failure"
    enable_if:
      condition: property
      property: features
      contains_value: AbortTestingOnFirstFailure
  - type: ExecuteCommand
    command: "{{.Env.TESTS_ENV_PREFIX}} ctest {{.Env.CTEST_ARGS}}"
    executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
    ignoreExitCode: false
    maxTimeInSeconds: 10800
    maxTimeBetweenOutput: 900
    userMessageOnFailure: >
      Failed to run tests.

  - type: Group
    instructions:
      # Qttestrunner does not work with bic tests.
      - type: EnvironmentVariable
        variableName: TESTRUNNER
        variableValue: ""
      - type: EnvironmentVariable
        variableName: QT_MODULE_TO_TEST
        variableValue: "{{.SourceDir}}"
      - type: PrependToEnvironmentVariable
        variableName: PATH
        variableValue: "{{.InstallDir}}/bin:"
      - type: InstallSourceArchive
        maxTimeInSeconds: 600
        maxTimeBetweenOutput: 600
        project: qt/qtqa
        ref: dev
        directory: qt/qtqa
        userMessageOnFailure: "Could not install qt/qtqa source archive. Please investigate why."
      - type: ChangeDirectory
        directory: "{{.AgentWorkingDir}}/qt/qtqa/tests/postbuild/bic"
      - type: ExecuteCommand
        command: ["{{.InstallDir}}/bin/qmake"]
        maxTimeInSeconds: 7200
        maxTimeBetweenOutput: 300
        userMessageOnFailure: "Failed to execute qmake for bic tests"
      - type: RunQtUnitTest
        runTestCommand: ["make", "check", "-j1"]
        directory: "{{.AgentWorkingDir}}/qt/qtqa/tests/postbuild/bic"
        testRepetitionAllowance: 0
        maxTimeInSeconds: 7200
        maxTimeBetweenOutput: 300
        userMessageOnFailure: "Running bic tests failed."
    enable_if:
      condition: and
      conditions:
        - condition: property
          property: features
          contains_value: Packaging
        - condition: property
          property: target.os
          equals_value: Linux
        - condition: property
          property: features
          contains_value: EnableBicTests