Commit 33f02f55 authored by DIAZ Jerome's avatar DIAZ Jerome Committed by GILLES Sebastien
Browse files

#1489 Added Valgrind script and corresponding stage for CI.

parent fd126f1f
valgrind:
stage: analysis
image: registry.gitlab.inria.fr/morefem/analysistools/valgrind:latest
script:
- python Scripts/Tools/run_valgrind.py
dependencies: []
artifacts:
name: "artifact_${CI_PROJECT_ID}_${CI_COMMIT_REF_SLUG}_${OS}-valgrind"
expire_in: 2 days
when: always
# paths:
# - morefem-valgrind.xml
# only:
# - develop@morefem/corelibrary/morefem
# - /(sonarqube)/
cppcheck:
stage: analysis
......@@ -15,6 +31,7 @@ cppcheck:
- develop@morefem/corelibrary/morefem
- /(sonarqube)/
rats:
stage: analysis
image: registry.gitlab.inria.fr/morefem/analysistools/rats:latest
......
include:
- local: '/ExternalTools/Gitlab-CI/common.yml'
- local: '/ExternalTools/Gitlab-CI/analysis.yml'
build_ubuntu_gcc_debug_several_shared_libraries:
extends: .build_template_linux
......
import os
import sys
import shutil
import subprocess
if __name__ == "__main__":
morefem_source_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..", "Sources")
build_dir = os.path.join(morefem_source_dir, "..", "build_4_valgrind")
if os.path.exists(build_dir):
shutil.rmtree(build_dir)
os.mkdir(build_dir)
os.chdir(build_dir)
cmd = ( "python", \
"../cmake/Scripts/configure_cmake.py", \
"--cache_file=../cmake/PreCache/linux.cmake", \
"--cmake_args=\"-G Ninja\"", \
"--install_directory=/opt")
subprocess.Popen(cmd, shell = False).communicate()
cmd = "ninja"
subprocess.Popen(cmd, shell = True).communicate()
# executables_dir = os.path.join(build_dir, "Sources")
#
# os.chdir(executables_dir)
cmd = "valgrind --error-exitcode=1 --log-file=memcheck_matrix_operations.txt --gen-suppressions=all --show-leak-kinds=all --show-reachable=yes --track-origins=yes --leak-check=full --suppressions=${HOME}/Codes/MoReFEM/CoreLibrary/ExternalTools/Valgrind/openmpi.suppr --suppressions=${HOME}/Codes/MoReFEM/CoreLibrary/ExternalTools/Valgrind/libgomp.suppr --suppressions=${HOME}/Codes/MoReFEM/CoreLibrary/ExternalTools/Valgrind/libc.suppr Sources/MoReFEMTestPetscMatrixOperations -i ${HOME}/Codes/MoReFEM/CoreLibrary/Sources/Test/ThirdParty/PETSc/MatrixOperations/demo.lua "
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