Commit 400dd999 authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#177 Valgrind script: fix the shell=False issues.

parent c17f3b7e
import os
import pathlib
import sys
import shutil
import subprocess
......@@ -9,8 +10,9 @@ def MoReFEMRootDir():
This uses up the fact the directory in which present script is stored is known.
"""
return os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..")
return pathlib.Path(os.path.dirname(os.path.realpath(__file__)), "..", "..", "..").resolve()
class RunValgrind:
"""Compile the sources related to one executable and then run the Valgrind analysis on the executable.
......@@ -43,7 +45,7 @@ class RunValgrind:
cmd = ("python",
f"{morefem_cmake_dir}/Scripts/configure_cmake.py",
f"--cache_file={morefem_cmake_dir}/PreCache/linux.cmake",
'--cmake_args=\"-G Ninja\"',
f'--cmake_args=-G Ninja',
"--third_party_directory=/opt",
'--mode=debug')
......@@ -57,8 +59,9 @@ class RunValgrind:
def _runValgrind(self):
cmd = (f"MOREFEM_ROOT={self.__morefem_root_dir}",
"valgrind",
os.environ["MOREFEM_ROOT"] = str(self.__morefem_root_dir)
cmd = ("valgrind",
"--error-exitcode=1",
f"--log-file={self.__output}",
"--gen-suppressions=all",
......
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