Skip to content

Commit

Permalink
Enable Valgrind tests on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
Morwenn committed Nov 30, 2019
1 parent ea34507 commit 1ef3d42
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,18 @@ matrix:
compiler: gcc

# OSX clang
- os: osx
osx_image: xcode9.2
env: BUILD_TYPE=Debug USE_VALGRIND=true CMAKE_GENERATOR="Xcode"
addons:
homebrew:
update: true
packages:
- ccache
- cmake
- valgrind
compiler: clang

- os: osx
osx_image: xcode8.3
env: BUILD_TYPE=Release CMAKE_GENERATOR="Xcode"
Expand Down
3 changes: 3 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ set(GFX_TIMSORT_SANITIZE "" CACHE STRING "Comma-separated list of options to pas
if (${GFX_TIMSORT_USE_VALGRIND})
find_program(MEMORYCHECK_COMMAND valgrind)
set(MEMORYCHECK_COMMAND_OPTIONS "--leak-check=full --track-origins=yes --error-exitcode=1 --show-reachable=no")
if (APPLE)
set(MEMORYCHECK_SUPPRESSIONS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/valgrind-osx.supp)
endif()
endif()

macro(configure_tests target)
Expand Down
29 changes: 29 additions & 0 deletions tests/valgrind-osx.supp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
Mac-OS-X-System-Leaks
Memcheck:Leak
match-leak-kinds: possible
fun:calloc
fun:map_images_nolock
fun:map_images
fun:_ZN4dyldL18notifyBatchPartialE17dyld_image_statesbPFPKcS0_jPK15dyld_image_infoEbb
fun:_ZN4dyld21registerObjCNotifiersEPFvjPKPKcPKPK11mach_headerEPFvS1_S6_ESC_
fun:_dyld_objc_notify_register
fun:_objc_init
fun:_os_object_init
fun:libdispatch_init
fun:libSystem_initializer
fun:_ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
fun:_ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjPKcRNS_21InitializerTimingListERNS_15UninitedUpwardsE
fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjPKcRNS_21InitializerTimingListERNS_15UninitedUpwardsE
fun:_ZN11ImageLoader19processInitializersERKNS_11LinkContextEjRNS_21InitializerTimingListERNS_15UninitedUpwardsE
fun:_ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE
fun:_ZN4dyld24initializeMainExecutableEv
fun:_ZN4dyld5_mainEPK12macho_headermiPPKcS5_S5_Pm
fun:_ZN13dyldbootstrap5startEPK12macho_headeriPPKclS2_Pm
fun:_dyld_start
obj:*
obj:*
obj:*
obj:*
}

0 comments on commit 1ef3d42

Please sign in to comment.