Maj terminée. Pour consulter la release notes associée voici le lien :

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
......@@ -61,7 +63,7 @@ class RunValgrind:
os.environ["MOREFEM_ROOT"] = str(self.__morefem_root_dir)
cmd = ("valgrind",
cmd = ["valgrind",
......@@ -75,10 +77,12 @@ class RunValgrind:
if self.__is_model:
cmd.append("--overwrite_directory"), 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