Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

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

#177 Few robustification changes:

- Path where the run valgrind scripts has been changed.
- A new Yaml file dedicated to Valgrind has been introduced.
- The path to MoReFEM root directory now follows the DRY principle.
- The leak deliberately introduced in previous commit has been removed.
- In Yaml, Valgrind scripts are allowed to fail (the rationale is that such checks must occur before a new tag; in this case the best is to let everything run in analysis and strive to correct all the orange tasks).
parent c8d237e8
valgrind-elasticity:
stage: valgrind
image: registry.gitlab.inria.fr/morefem/analysistools/valgrind:latest
script:
- mkdir -p build
- cd build && python ../Scripts/Tools/run_valgrind_elasticity.py
dependencies: []
cache:
key: "cache_${CI_PROJECT_ID}_${CI_COMMIT_REF_SLUG}_elasticity"
untracked: true
paths:
- build
artifacts:
name: "artifact_${CI_PROJECT_ID}_${CI_COMMIT_REF_SLUG}_${OS}-valgrind-elasticity"
expire_in: 2 days
when: always
paths:
- memcheck_elasticity.txt
# after_script:
# - rm -rf build4valgrind/
only:
- develop@morefem/corelibrary/morefem
- /(valgrind)/
cppcheck:
stage: analysis
image: registry.gitlab.inria.fr/morefem/analysistools/cppcheck:latest
......
......@@ -97,6 +97,7 @@ if __name__ == "__main__":
print("include:")
print(" - local: '/ExternalTools/Gitlab-CI/common.yml'")
print(" - local: '/ExternalTools/Gitlab-CI/valgrind.yml'")
print(" - local: '/ExternalTools/Gitlab-CI/analysis.yml'\n\n")
configuration_list = \
......
include:
- local: '/ExternalTools/Gitlab-CI/common.yml'
- local: '/ExternalTools/Gitlab-CI/valgrind.yml'
- local: '/ExternalTools/Gitlab-CI/analysis.yml'
build_ubuntu_gcc_debug_several_shared_libraries:
......
include:
- local: '/ExternalTools/Gitlab-CI/common.yml'
- local: '/ExternalTools/Gitlab-CI/valgrind.yml'
- local: '/ExternalTools/Gitlab-CI/analysis.yml'
# build_ubuntu_gcc_debug_several_shared_libraries:
......
valgrind-elasticity:
stage: valgrind
image: registry.gitlab.inria.fr/morefem/analysistools/valgrind:latest
script:
- mkdir -p build
- cd build && python ../Scripts/CI/Valgrind/run_valgrind_elasticity.py
dependencies: []
cache:
key: "cache_${CI_PROJECT_ID}_${CI_COMMIT_REF_SLUG}_elasticity"
untracked: true
paths:
- build
artifacts:
name: "artifact_${CI_PROJECT_ID}_${CI_COMMIT_REF_SLUG}_${OS}-valgrind-elasticity"
expire_in: 2 days
when: always
paths:
- memcheck_elasticity.txt
# after_script:
# - rm -rf build4valgrind/
only:
- develop@morefem/corelibrary/morefem
- /(valgrind)/
allow_failure: true
import os
from run_valgrind_tools import RunValgrind
from run_valgrind_tools import MoReFEMRootDir, RunValgrind
if __name__ == "__main__":
morefem_root_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..")
morefem_root_dir = MoReFEMRootDir()
morefem_model_instances_dir = os.path.join(morefem_root_dir, "Sources", "ModelInstances")
lua_file = os.path.join(morefem_model_instances_dir, "Elasticity", "demo_2d_binary.lua")
......
......@@ -4,6 +4,14 @@ import shutil
import subprocess
def MoReFEMRootDir():
"""Returns the path to the root dir of MoReFEM.
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__)), "..", "..", "..")
class RunValgrind:
"""Compile the sources related to one executable and then run the Valgrind analysis on the executable.
......@@ -16,7 +24,7 @@ class RunValgrind:
self.__executable = executable
self.__lua_file = lua_file
self.__output = output
self.__morefem_root_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "..")
self.__morefem_root_dir = MoReFEMRootDir()
try:
self._callCMake()
......
......@@ -34,8 +34,6 @@ int main(int argc, char** argv)
const auto& input_data = morefem_data.GetInputData();
const auto& mpi = morefem_data.GetMpi();
int* foo = new int(5); // \todo Just a temporary check for #177
try
{
ElasticityNS::ElasticityModel model(morefem_data);
......
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