Skip to content

Commit 1f5b289

Browse files
author
Daniele Giunchi
committed
add definitely valgrind
1 parent dbdd1fb commit 1f5b289

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

CMake/Findvalgrind.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# FindGit
33
#
44

5-
SET(valgrind_FOUND FALSE)
5+
SET(valgrind_FOUND 0)
66
find_program(valgrind_LIBRARY
77
NAMES valgrind
88
PATHS /usr/local/bin /usr/bin)
@@ -12,6 +12,7 @@ get_filename_component(valgrind_LIBRARY_DIR ${valgrind_LIBRARY} PATH)
1212
MARK_AS_ADVANCED(valgrind_FOUND)
1313

1414
IF(valgrind_LIBRARY)
15-
SET(valgrind_FOUND TRUE)
15+
SET(valgrind_FOUND 1)
16+
SET(valgrind_ENABLE 1)
1617
message(STATUS "valgrind found.")
1718
ENDIF(valgrind_LIBRARY)

CMakeExternals/External_PythonQt.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
IF("${QTVERSION}" MATCHES ".*4.7.*")
100100
SET(revision_tag 099805b447d54dac22b2e548c078ba39fd724f50)
101101
ELSE("${QTVERSION}" MATCHES ".*4.7.*")
102-
SET(revision_tag origin/master)
102+
SET(revision_tag master)
103103
ENDIF("${QTVERSION}" MATCHES ".*4.7.*")
104104

105105
ExternalProject_Add(${proj}

src/mafQA/qa/BinaryLauncher.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ def execute():
9393
if(str(os.sys.platform).lower() == 'win32'):
9494
os.system(absPath + " > " + logResult + " 2>&1 ")
9595
else:
96-
os.system("HEAPCHECK=normal " + absPath + " &> " + logResult)
96+
valgrindPrefix = ""
97+
if(mafPath.valgrind):
98+
valgrindPrefix = valgrindPath + " --leak-check=yes "
99+
os.system(valgrindPrefix + absPath + " &> " + logResult)
97100
#os.system(absPath + " &> " + logResult)
98101
name_key = "test-suite"
99102
if name_key in param:

src/mafQA/qa/mafPath.py.conf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@ mafDocOutput = os.path.join(mafQADir,"doc_output","DocOutput","xml")
1515
#represents the output directory of the doxygen of the C++ source files wit tests, in xml
1616
mafDocWithTestsOutput = os.path.join(mafQADir,"doc_output","DocWithTestsOutput","xml")
1717
#represents the output directory of the doxygen of the Python source files, in xml
18-
mafPythonDocOutput = os.path.join("@MAF_BINARY_DIR@","qa","doc_output","PythonDocOutput","xml")
18+
mafPythonDocOutput = os.path.join("@MAF_BINARY_DIR@","qa","doc_output","PythonDocOutput","xml")
19+
20+
#flags
21+
valgrind = @valgrind_FOUND@
22+
if(valgrind):
23+
valgrindPath = "@valgrind_LIBRARY_DIR@" + "/valgrind"

0 commit comments

Comments
 (0)