Commit 909a4575 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#177 Fix issues in the proposed Python Valgrind scripts.

parent 32d8c350
import os
from run_valgrid_tools import buildAndRunValgrind
from run_valgrind_tools import buildAndRunValgrind
if __name__ == "__main__":
morefem_model_instances_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "Sources", "ModelInstances")
lua_file = os.path.join(morefem_model_instances_dir, "Elasticity", "demo_2d_binary.lua")
buildAndRunValgrind("MoReFEM4Elasticity", lua_file, "memcheck_elasticity.txt"
\ No newline at end of file
#
buildAndRunValgrind("MoReFEM4Elasticity", lua_file, "memcheck_elasticity.txt")
......@@ -9,15 +9,19 @@ def build(executable):
morefem_cmake_dir = os.path.join(morefem_root_dir, "cmake")
build_directory = os.path.join(morefem_root_dir, "build4valgrind")
os.chdir(morefem_root_dir)
if os.path.exists(build_directory):
shutil.rmtree(build_directory)
os.mkdir(build_directory)
os.chdir(build_directory)
cmd = "python {cmake_dir}/Scripts/configure_cmake.py --cache_file={cmake_dir}/PreCache/linux.cmake --cmake_args=\"-G Ninja\" --third_party_directory=/opt --mode=\"debug\"".format(cmake_dir = morefem_cmake_dir)
print(cmd)
subprocess.Popen(cmd, shell = True).communicate()
cmd = "ninja {}".format(executable
cmd = "ninja {}".format(executable)
subprocess.Popen(cmd, shell = True).communicate()
......
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