Commit 4feb85fb authored by GILLES Sebastien's avatar GILLES Sebastien
Browse files

#177 Valgrind script: 'convert' commands into ones for shell=False.

parent 2c4a3a98
......@@ -39,24 +39,45 @@ class RunValgrind:
morefem_cmake_dir = os.path.join(self.__morefem_root_dir, "cmake")
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)
subprocess.run(cmd, shell = True).check_returncode()
cmd = ("python",
f"{morefem_cmake_dir}/Scripts/configure_cmake.py",
f"--cache_file={morefem_cmake_dir}/PreCache/linux.cmake",
'--cmake_args="-G Ninja"',
"--third_party_directory=/opt",
'--mode="debug"')
subprocess.run(cmd, shell = False).check_returncode()
def _compile(self):
cmd = "ninja {}".format(self.__executable)
subprocess.run(cmd, shell = True).check_returncode()
cmd = ("ninja", self.__executable)
subprocess.run(cmd, shell = False).check_returncode()
def _runValgrind(self):
def _runValgrind(self):
cmd = "MOREFEM_ROOT={} valgrind --error-exitcode=1 --log-file={output} --gen-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} --overwrite_directory -e MOREFEM_RESULT_DIR=Results".format(self.__morefem_root_dir, output = self.__output, lua_file = self.__lua_file, executable = self.__executable)
cmd = (f"MOREFEM_ROOT={self.__morefem_root_dir}",
"valgrind",
"--error-exitcode=1",
f"--log-file={self.__output}",
"--gen-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",
self.__executable,
"-i",
self.__lua_file,
"--overwrite_directory",
"-e",
"MOREFEM_RESULT_DIR=Results")
subprocess.run(cmd, shell = True).check_returncode()
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