mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
gitlab-ci: add a job to test with Valgrind on Linux with Ninja
This commit is contained in:
@@ -1030,6 +1030,19 @@ t:fedora42-asan:
|
|||||||
variables:
|
variables:
|
||||||
CMAKE_CI_JOB_NIGHTLY: "true"
|
CMAKE_CI_JOB_NIGHTLY: "true"
|
||||||
|
|
||||||
|
t:fedora42-ninja-valgrind:
|
||||||
|
extends:
|
||||||
|
- .fedora42_ninja_valgrind
|
||||||
|
- .cmake_test_linux_release
|
||||||
|
# Use a fast CPU so that timeouts are less of a concern.
|
||||||
|
- .linux_x86_64_tags_fast_x11
|
||||||
|
- .cmake_valgrind_artifacts
|
||||||
|
- .run_dependent
|
||||||
|
- .needs_centos7_x86_64
|
||||||
|
variables:
|
||||||
|
CMAKE_CI_JOB_NIGHTLY: "true"
|
||||||
|
timeout: 2 hours
|
||||||
|
|
||||||
# macOS builds
|
# macOS builds
|
||||||
|
|
||||||
b:macos-x86_64-ninja:
|
b:macos-x86_64-ninja:
|
||||||
|
2
.gitlab/ci/.gitattributes
vendored
Normal file
2
.gitlab/ci/.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Do not apply a size limit to suppression files.
|
||||||
|
*.valgrind.supp -hooks-max-size
|
6
.gitlab/ci/configure_fedora42_ninja_valgrind.cmake
Normal file
6
.gitlab/ci/configure_fedora42_ninja_valgrind.cmake
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
set(CMake_TEST_Qt5 ON CACHE BOOL "")
|
||||||
|
set(CMake_TEST_Qt6 ON CACHE BOOL "")
|
||||||
|
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora42_valgrind.cmake")
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora42_ninja.cmake")
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake")
|
2
.gitlab/ci/configure_fedora42_valgrind.cmake
Normal file
2
.gitlab/ci/configure_fedora42_valgrind.cmake
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Disable bootstrap testing for Valgrind testing.
|
||||||
|
set(CMAKE_SKIP_BOOTSTRAP_TEST OFF CACHE BOOL "")
|
@@ -27,6 +27,20 @@ if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "_jom")
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "_valgrind")
|
||||||
|
list(APPEND test_exclusions
|
||||||
|
# Tests that timeout under valgrind.
|
||||||
|
"^RunCMake.NinjaMultiConfig$"
|
||||||
|
"^RunCMake.Autogen_Qt6_1$"
|
||||||
|
"^RunCMake.GoogleTest$"
|
||||||
|
"^RunCMake.CXXModules$"
|
||||||
|
"^RunCMake.CommandLine$"
|
||||||
|
|
||||||
|
# Too spurious under Valgrind.
|
||||||
|
"^RunCMake.testUVProcessChain$"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
string(REPLACE ";" "|" test_exclusions "${test_exclusions}")
|
string(REPLACE ";" "|" test_exclusions "${test_exclusions}")
|
||||||
if (test_exclusions)
|
if (test_exclusions)
|
||||||
set(test_exclusions "(${test_exclusions})")
|
set(test_exclusions "(${test_exclusions})")
|
||||||
|
91
.gitlab/ci/ctest_memcheck_fedora42.valgrind.supp
Normal file
91
.gitlab/ci/ctest_memcheck_fedora42.valgrind.supp
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
# Add Valgrind suppressions here.
|
||||||
|
{
|
||||||
|
libc_start_main-malloc
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: reachable
|
||||||
|
fun:malloc
|
||||||
|
...
|
||||||
|
fun:__libc_start_main@@GLIBC_2.34
|
||||||
|
...
|
||||||
|
}
|
||||||
|
{
|
||||||
|
dl_init-malloc
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: reachable
|
||||||
|
fun:malloc
|
||||||
|
...
|
||||||
|
fun:_dl_init
|
||||||
|
...
|
||||||
|
}
|
||||||
|
{
|
||||||
|
dl_init-calloc
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: reachable
|
||||||
|
fun:calloc
|
||||||
|
...
|
||||||
|
fun:_dl_init
|
||||||
|
...
|
||||||
|
}
|
||||||
|
{
|
||||||
|
dl_init-realloc
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: reachable
|
||||||
|
fun:realloc
|
||||||
|
...
|
||||||
|
fun:_dl_init
|
||||||
|
...
|
||||||
|
}
|
||||||
|
{
|
||||||
|
dl_open-malloc
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: reachable
|
||||||
|
fun:malloc
|
||||||
|
...
|
||||||
|
fun:_dl_open
|
||||||
|
...
|
||||||
|
}
|
||||||
|
{
|
||||||
|
dl_open-calloc
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: reachable
|
||||||
|
fun:calloc
|
||||||
|
...
|
||||||
|
fun:_dl_open
|
||||||
|
...
|
||||||
|
}
|
||||||
|
{
|
||||||
|
qt5-object-new
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: reachable
|
||||||
|
fun:_Znwm
|
||||||
|
...
|
||||||
|
fun:_ZN7QObjectC1ER14QObjectPrivatePS_
|
||||||
|
...
|
||||||
|
}
|
||||||
|
{
|
||||||
|
qt5-logger-malloc
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: reachable
|
||||||
|
fun:malloc
|
||||||
|
...
|
||||||
|
fun:_ZNK14QMessageLogger5debugEv
|
||||||
|
...
|
||||||
|
}
|
||||||
|
{
|
||||||
|
strerror_l-malloc
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: reachable
|
||||||
|
fun:malloc
|
||||||
|
fun:__vasprintf_internal
|
||||||
|
fun:__asprintf_chk
|
||||||
|
fun:strerror_l
|
||||||
|
...
|
||||||
|
}
|
||||||
|
{
|
||||||
|
bash
|
||||||
|
Memcheck:Leak
|
||||||
|
match-leak-kinds: reachable
|
||||||
|
...
|
||||||
|
obj:/usr/bin/bash
|
||||||
|
...
|
||||||
|
}
|
1
.gitlab/ci/env_fedora42_ninja_valgrind.sh
Normal file
1
.gitlab/ci/env_fedora42_ninja_valgrind.sh
Normal file
@@ -0,0 +1 @@
|
|||||||
|
source .gitlab/ci/env_fedora42_ninja.sh
|
@@ -337,6 +337,15 @@
|
|||||||
CTEST_MEMORYCHECK_TYPE: AddressSanitizer
|
CTEST_MEMORYCHECK_TYPE: AddressSanitizer
|
||||||
CTEST_MEMORYCHECK_SANITIZER_OPTIONS: ""
|
CTEST_MEMORYCHECK_SANITIZER_OPTIONS: ""
|
||||||
|
|
||||||
|
.fedora_valgrind_addon:
|
||||||
|
extends: .fedora_memcheck
|
||||||
|
|
||||||
|
variables:
|
||||||
|
CTEST_MEMORYCHECK_TYPE: Valgrind
|
||||||
|
CMAKE_CI_RUN_MEMCHECK: "true"
|
||||||
|
CMAKE_CI_TEST_TIMEOUT: "1500"
|
||||||
|
CMAKE_VALGRIND_CONFIGURATION: fedora42
|
||||||
|
|
||||||
.fedora42_asan:
|
.fedora42_asan:
|
||||||
extends:
|
extends:
|
||||||
- .fedora42
|
- .fedora42
|
||||||
@@ -345,6 +354,15 @@
|
|||||||
variables:
|
variables:
|
||||||
CMAKE_CONFIGURATION: fedora42_asan
|
CMAKE_CONFIGURATION: fedora42_asan
|
||||||
|
|
||||||
|
|
||||||
|
.fedora42_ninja_valgrind:
|
||||||
|
extends:
|
||||||
|
- .fedora42
|
||||||
|
- .fedora_valgrind_addon
|
||||||
|
|
||||||
|
variables:
|
||||||
|
CMAKE_CONFIGURATION: fedora42_ninja_valgrind
|
||||||
|
|
||||||
### Intel Compiler
|
### Intel Compiler
|
||||||
|
|
||||||
.intelcompiler:
|
.intelcompiler:
|
||||||
@@ -616,6 +634,13 @@
|
|||||||
- linux-x86_64
|
- linux-x86_64
|
||||||
- x11
|
- x11
|
||||||
|
|
||||||
|
.linux_x86_64_tags_fast_x11:
|
||||||
|
tags:
|
||||||
|
- cmake
|
||||||
|
- docker
|
||||||
|
- linux-x86_64-v4
|
||||||
|
- x11
|
||||||
|
|
||||||
.linux_x86_64_tags_cuda_arch_30:
|
.linux_x86_64_tags_cuda_arch_30:
|
||||||
tags:
|
tags:
|
||||||
- cmake
|
- cmake
|
||||||
|
Reference in New Issue
Block a user