Maj terminée. Pour consulter la release notes associée voici le lien :
https://about.gitlab.com/releases/2021/07/07/critical-security-release-gitlab-14-0-4-released/

Commit b18ff8ad authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#177 Valgrind script: add a new option to enable runs for tests rather than...

#177 Valgrind script: add a new option to enable runs for tests rather than models (--overwrite_directory flag is not known for the former). Also fix a stupid issue in Heat script.
parent 4c9befe7
......@@ -9,4 +9,4 @@ if __name__ == "__main__":
lua_file = os.path.join(morefem_model_instances_dir, "Heat", "demo_input_heat.lua")
#
RunValgrind("Sources/MoReFEM4Elasticity", lua_file, os.path.join(morefem_root_dir, "memcheck_heat.txt"))
RunValgrind("Sources/MoReFEM4Heat", lua_file, os.path.join(morefem_root_dir, "memcheck_heat.txt"))
......@@ -7,4 +7,4 @@ if __name__ == "__main__":
morefem_root_dir = MoReFEMRootDir()
lua_file = os.path.join(morefem_root_dir, "Sources", "Test", "ThirdParty", "PETSc", "MatrixOperations", "demo.lua")
RunValgrind("Sources/MoReFEMTestPetscMatrixOperations", lua_file, os.path.join(morefem_root_dir, "memcheck_test_matrix_operations.txt"))
RunValgrind("Sources/MoReFEMTestPetscMatrixOperations", lua_file, os.path.join(morefem_root_dir, "memcheck_test_matrix_operations.txt"), is_model = False)
......@@ -20,13 +20,15 @@ class RunValgrind:
\param[in] executable Executable to compile (e.g. MoReFEM4Elasticity).
\param[in] lua_file Lua file with the data required to run the model.
\param[in] output File in which output of the Valgrind analysis is written.
\param[in] is_model True if a model is involved, False otherwise.
"""
def __init__(self, executable, lua_file, output):
def __init__(self, executable, lua_file, output, is_model = True):
self.__executable = executable
self.__lua_file = lua_file
self.__output = output
self.__morefem_root_dir = MoReFEMRootDir()
self.__is_model = is_model
try:
self._callCMake()
......@@ -61,7 +63,7 @@ class RunValgrind:
os.environ["MOREFEM_ROOT"] = str(self.__morefem_root_dir)
cmd = ("valgrind",
cmd = ["valgrind",
"--error-exitcode=1",
f"--log-file={self.__output}",
"--gen-suppressions=all",
......@@ -75,10 +77,12 @@ class RunValgrind:
"--suppressions=../ExternalTools/Valgrind/libc.suppr",
self.__executable,
"-i",
self.__lua_file,
"--overwrite_directory",
self.__lua_file,
"-e",
"MOREFEM_RESULT_DIR=Results")
"MOREFEM_RESULT_DIR=Results"]
if self.__is_model:
cmd.append("--overwrite_directory")
subprocess.run(cmd, shell = False).check_returncode()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment