File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,13 @@ def get_cmake_tool():
53
53
54
54
return _get_program (["cmake" ])
55
55
56
+ def get_valgrind_tool ():
57
+ """
58
+ Get Valgrind program
59
+ """
60
+
61
+ return _get_program (["valgrind" ])
62
+
56
63
def get_cxx_tool ():
57
64
"""
58
65
Get C++ compiler
Original file line number Diff line number Diff line change 28
28
from .get_tools import get_make_tool , \
29
29
get_cmake_tool , \
30
30
get_cxx_tool , \
31
- get_c_tool
31
+ get_c_tool , \
32
+ get_valgrind_tool
32
33
from .settings import DEFAULT_CMAKE_GENERATORS
33
34
34
35
class UnitTestTool (object ):
@@ -96,6 +97,11 @@ def create_makefiles(self,
96
97
args .append ("-DCOVERAGE:STRING=%s" % coverage_output_type )
97
98
98
99
if valgrind :
100
+ valgrind = get_valgrind_tool ()
101
+ if valgrind is None :
102
+ logging .error (
103
+ "No Valgrind found in Path. Install all the required tools.\n " )
104
+ sys .exit (1 )
99
105
args .append ("-DVALGRIND=1" )
100
106
args .append ("-DMEMORYCHECK_COMMAND_OPTIONS=\" --track-origins=yes\" \" --leak-check=full\" \" --show-reachable=yes\" \" --error-exitcode=1\" " )
101
107
else :
You can’t perform that action at this time.
0 commit comments