File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 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():
5353
5454 return _get_program (["cmake" ])
5555
56+ def get_valgrind_tool ():
57+ """
58+ Get Valgrind program
59+ """
60+
61+ return _get_program (["valgrind" ])
62+
5663def get_cxx_tool ():
5764 """
5865 Get C++ compiler
Original file line number Diff line number Diff line change 2828from .get_tools import get_make_tool , \
2929 get_cmake_tool , \
3030 get_cxx_tool , \
31- get_c_tool
31+ get_c_tool , \
32+ get_valgrind_tool
3233from .settings import DEFAULT_CMAKE_GENERATORS
3334
3435class UnitTestTool (object ):
@@ -96,6 +97,11 @@ def create_makefiles(self,
9697 args .append ("-DCOVERAGE:STRING=%s" % coverage_output_type )
9798
9899 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 )
99105 args .append ("-DVALGRIND=1" )
100106 args .append ("-DMEMORYCHECK_COMMAND_OPTIONS=\" --track-origins=yes\" \" --leak-check=full\" \" --show-reachable=yes\" \" --error-exitcode=1\" " )
101107 else :
You can’t perform that action at this time.
0 commit comments