From c88070736954558f98ffa08556a50152291f56a9 Mon Sep 17 00:00:00 2001
From: Giovanni La Mura <giovanni.lamura@inaf.it>
Date: Fri, 14 Feb 2025 15:03:05 +0100
Subject: [PATCH] Add inclusion testing to gitLab pipeline

---
 .gitlab-ci.yml | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f3a300bf..2e8242e2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -174,7 +174,7 @@ sanity_stage:
       - building_stage
    artifacts:
       paths:
-         - build/testing/valgrind.log
+         - build/testing/valgrind_*.log
       exclude:
          - ".git*"
          - ".git/**/*"
@@ -190,18 +190,16 @@ sanity_stage:
       - cd ../testing
       - echo "Running memory sanity check for ParticleDescriptor"
       - chmod +x test_ParticleDescriptor
-      - valgrind --leak-check=full --log-file=valgrind.log ./test_ParticleDescriptor
-      - grep "0 errors from 0 contexts" valgrind.log
+      - valgrind --leak-check=full --log-file=valgrind_Particle.log ./test_ParticleDescriptor
+      - grep "0 errors from 0 contexts" valgrind_Particle.log
       - echo "Running memory sanity check for output classes"
       - chmod +x test_cluster_outputs
-      - rm valgrind.log
-      - valgrind --leak-check=full --log-file=valgrind.log ./test_cluster_outputs
-      - grep "0 errors from 0 contexts" valgrind.log
+      - valgrind --leak-check=full --log-file=valgrind_cluster.log ./test_cluster_outputs
+      - grep "0 errors from 0 contexts" valgrind_cluster.log
       - rm -rf c_OCLU_24
       - chmod +x test_inclusion_outputs
-      - rm valgrind.log
-      - valgrind --leak-check=full --log-file=valgrind.log ./test_inclusion_outputs
-      - grep "0 errors from 0 contexts" valgrind.log
+      - valgrind --leak-check=full --log-file=valgrind_inclusion.log ./test_inclusion_outputs
+      - grep "0 errors from 0 contexts" valgrind_inclusion.log
       
 running_stage:
    stage: run
@@ -298,10 +296,16 @@ testing_stage:
       - export FFILE=../../test_data/cluster/OCLU_48
       - python3 ../../src/scripts/pycompare.py --no-progress --ffile $FFILE --cfile c_OCLU --html=pycompare_48.html
       - cd ../testing
-      - echo "Checking consistency of HDF5 output"
+      - echo "Checking consistency of HDF5 cluster output"
       - chmod u+x test_cluster_outputs
       - ./test_cluster_outputs
       - export FFILE=../../test_data/cluster/OCLU_24
       - python3 ../../src/scripts/pycompare.py --no-progress --ffile $FFILE --cfile c_OCLU_24
       - rm -rf c_OCLU_24
+      - echo "Checking consistency of HDF5 incluson output"
+      - chmod u+x test_inclusion_outputs
+      - ./test_inclusion_outputs
+      - export FFILE=../../test_data/inclusion/OINCLU
+      - python3 ../../src/scripts/pycompare.py --no-progress --ffile $FFILE --cfile c_OINCLU
+      - rm -rf c_OINCLU
       
\ No newline at end of file
-- 
GitLab