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

#177 Handle Valgrind scripts more like the usual build ones (i.e. mkdir and cd...

#177 Handle Valgrind scripts more like the usual build ones (i.e. mkdir and cd done in Yaml rather than in Python directly).
parent 5e111cac
......@@ -2,7 +2,8 @@ valgrind-elasticity:
stage: valgrind
image: registry.gitlab.inria.fr/morefem/analysistools/valgrind:latest
script:
- python Scripts/Tools/run_valgrind_elasticity.py
- mkdir -p build4valgrind
- cd build && python ../Scripts/Tools/run_valgrind_elasticity.py
dependencies: []
artifacts:
name: "artifact_${CI_PROJECT_ID}_${CI_COMMIT_REF_SLUG}_${OS}-valgrind-elasticity"
......
......@@ -7,15 +7,15 @@ def build(executable):
morefem_root_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..")
morefem_cmake_dir = os.path.join(morefem_root_dir, "cmake")
build_directory = os.path.join(morefem_root_dir, "build4valgrind")
# 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)
# 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)
......@@ -27,11 +27,11 @@ def build(executable):
def runValgrind(executable, lua_file, output):
morefem_root_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..")
build_directory = os.path.join(morefem_root_dir, "build4valgrind")
os.chdir(build_directory)
# morefem_root_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..")
# build_directory = os.path.join(morefem_root_dir, "build4valgrind")
#
# os.chdir(build_directory)
#
cmd = "valgrind --error-exitcode=1 --log-file={output} -suppressions=all --show-leak-kinds=all --show-reachable=yes --track-origins=yes --leak-check=full --errors-for-leak-kinds=all --suppressions=../ExternalTools/Valgrind/openmpi.suppr --suppressions=../ExternalTools/Valgrind/libgomp.suppr --suppressions=../ExternalTools/Valgrind/libc.suppr {executable} -i {lua_file} -e MOREFEM_RESULT_DIR=Results".format(output = output, lua_file = lua_file, executable = 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