From 6b826080681a2117b8e75012ebcb18e4770ce358 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Thu, 7 May 2015 14:02:34 +0300 Subject: Added convenience target to run with Valgrind on OSX and Linux The target (run-valgrind-[osx|linux]) will launch the test app with valgrind using the leak checker and our custom suppresion file. --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0836bbc65c..0a1d142983 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ endif ifeq ($(shell uname -s), Linux) HOST = linux JOBS ?= $(shell grep --count processor /proc/cpuinfo) +BUILD_ROOT = $(shell pwd) endif JOBS ?= 1 @@ -92,6 +93,9 @@ osx: Makefile/project run-osx: osx "build/osx/$(BUILDTYPE)/Mapbox GL.app/Contents/MacOS/Mapbox GL" +run-valgrind-osx: osx + (valgrind --leak-check=full --suppressions=scripts/valgrind.sup build/osx/$(BUILDTYPE)/Mapbox\ GL.app/Contents/MacOS/Mapbox\ GL) + .PHONY: xosx-proj xosx run-xosx xosx-proj: Xcode/project open ./build/osx/gyp/osx.xcodeproj @@ -152,6 +156,9 @@ linux: Makefile/project run-linux: linux (cd build/$(HOST)/$(BUILDTYPE) && ./mapbox-gl) +run-valgrind-linux: linux + (cd build/$(HOST)/$(BUILDTYPE) && valgrind --leak-check=full --suppressions=$(BUILD_ROOT)/scripts/valgrind.sup ./mapbox-gl) + .PHONY: xlinux run-xlinux xlinux: XCPRETTY := $(shell ./scripts/xcpretty.sh) xlinux: Xcode/project -- cgit v1.2.1