summaryrefslogtreecommitdiffstats
path: root/coin/instructions
diff options
context:
space:
mode:
authorDimitrios Apostolou <jimis@qt.io>2022-06-02 14:54:37 +0200
committerDimitrios Apostolou <jimis@qt.io>2022-06-15 23:58:16 +0200
commitfe0e87c9a6bb43c71e3af2083b5b0800c7dbca44 (patch)
tree8217be02087596f11f9a755ec1eb30fb13aa9ab3 /coin/instructions
parent96001cb81234c11e35b06ed5d96fa923d170ddd7 (diff)
Add ASAN build for qtbase
The test run is wrapped with a special TESTRUNNER script that ignores failing tests (there are several tests failing when built with ASAN) and also ignores LSAN errors (memory leaks - but still visible in the output). The test run only fails if a test reports ASAN errors or if it crashes (or times out, which is like a crash caused by qtestlib's watchdog timer). Fixes: QTQAINFRA-5025 Change-Id: I861756ab49388ac4a52409d3a780684244e469b1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'coin/instructions')
-rw-r--r--coin/instructions/cmake_run_ctest_enforce_exit_code.yaml14
-rw-r--r--coin/instructions/prepare_building_env.yaml21
2 files changed, 35 insertions, 0 deletions
diff --git a/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml b/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml
index 913e00ddd9..e1e16bca89 100644
--- a/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml
+++ b/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml
@@ -29,6 +29,20 @@ instructions:
condition: property
property: host.os
equals_value: Windows
+ - 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: "{{.InstallDir}}/libexec/sanitizer-testrunner.py"
- type: EnvironmentVariable
variableName: COIN_CTEST_RESULTSDIR
variableValue: "{{.AgentWorkingDir}}\\testresults"
diff --git a/coin/instructions/prepare_building_env.yaml b/coin/instructions/prepare_building_env.yaml
index e1ff30ea70..09b686ec0d 100644
--- a/coin/instructions/prepare_building_env.yaml
+++ b/coin/instructions/prepare_building_env.yaml
@@ -408,6 +408,27 @@ instructions:
contains_value: WarningsAreErrors
- type: Group
+ enable_if:
+ condition: property
+ property: features
+ contains_value: UseAddressSanitizer
+ instructions:
+ - type: AppendToEnvironmentVariable
+ variableName: COMMON_CMAKE_ARGS
+ variableValue: " -DFEATURE_sanitize_address=ON"
+ disable_if:
+ condition: property
+ property: features
+ contains_value: UseConfigure
+ - type: AppendToEnvironmentVariable
+ variableName: CONFIGURE_ARGS
+ variableValue: " -sanitize address"
+ enable_if:
+ condition: property
+ property: features
+ contains_value: UseConfigure
+
+ - type: Group
instructions:
- type: AppendToEnvironmentVariable
variableName: COMMON_CMAKE_ARGS